Use custom Chrome flags and Lighthouse configurations
mainYou can customize the audit environment by referencing a lighthouserc file. This file can define Chrome flags via the collect.settings.chromeFlags key or point to a custom Lighthouse configuration file via collect.settings.configPath.
// lighthouserc.json with Chrome flags
{
"ci": {
"collect": {
"numberOfRuns": 1,
"settings": {
"chromeFlags": "--disable-gpu --no-sandbox --no-zygote"
}
}
}
}
// lighthouserc.json referencing a custom Lighthouse config
{
"ci": {
"collect": {
"numberOfRuns": 1,
"settings": {
"configPath": "./lighthouse-config.js"
}
}
}
}