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'],
},
})
Static Reports
Generate static Lighthouse reports for your entire site. Export as HTML, CSV, or JSON. Deploy to Netlify, CloudFlare, or any static host.
Puppeteer
Configure Puppeteer launch options for headless Chrome: --no-sandbox, Docker args, viewport, executable path, and navigation hooks. Copy-paste configs for CI and Docker.