Guides

Lighthouse Config & Desktop/Mobile Presets

Customize audit categories, performance thresholds, and behavior through the lighthouseOptions configuration key. Unlighthouse passes these options directly to Google Lighthouse.

import { defineUnlighthouseConfig } from 'unlighthouse/config'

export default defineUnlighthouseConfig({
  lighthouseOptions: {
    throttlingMethod: 'devtools',
  },
})

For complete options, see the Lighthouse Configuration docs.

Aliases

Unlighthouse aims to minimise and simplify configuration, where possible.

For this reason, a number of configurations aliases are provided for your convenience.

You can always configure lighthouse directly if you are comfortable with the configuration.

Selecting Categories

By default, Unlighthouse will scan the categories: 'performance', 'accessibility', 'best-practices', 'seo'.

The performance category measures Core Web Vitals including LCP, CLS, and INP.

It can be useful to remove certain categories from being scanned to improve scan times. The Unlighthouse UI will adapt to any categories you select.

Only Performance

export default defineUnlighthouseConfig({
  lighthouseOptions: {
    onlyCategories: ['performance'],
  },
})
Did this page help you?
Anything that could be done better? :)
Help us improve this page. You can edit this page on GitHub or provide anonymous feedback below.