Depending on your experience level, you can choose different configuration strategies:
Easy Mode
Recommended for beginners. Only configure upload to manually monitor scores.
Next Level
Recommended for those familiar with Lighthouse. Use assert with a preset (e.g., lighthouse:recommended) and disable specific audits you are currently failing using the assertions object.
The Complete Experience
Recommended for seasoned users. Use collect to increase numberOfRuns, assert to set specific metric budgets (e.g., first-contentful-paint), and upload to send results to a Lighthouse CI server.
// Easy Mode
{
"ci": {
"upload": {
"target": "temporary-public-storage"
}
}
}
// Next Level
{
"ci": {
"assert": {
"preset": "lighthouse:recommended",
"assertions": {
"offscreen-images": "off",
"uses-webp-images": "off",
"color-contrast": "off"
}
},
"upload": {
"target": "temporary-public-storage"
}
}
}
// The Complete Experience
{
"ci": {
"collect": {
"numberOfRuns": 5
},
"assert": {
"preset": "lighthouse:recommended",
"assertions": {
"first-contentful-paint": [
"error",
{"maxNumericValue": 2000, "aggregationMethod": "optimistic"}
],
"interactive": ["error", {"maxNumericValue": 5000, "aggregationMethod": "optimistic"}]
}
},
"upload": {
"target": "lhci",
"serverBaseUrl": "https://lhci.example.com"
}
}
}