Skip to main content
The Lighthouse config object is the primary way to customize a Lighthouse run. You can use it to limit which audits run, add custom checks, adjust throttling, tweak scoring, and more.

Passing a config

1

Create a config file

Create a JavaScript file that exports your config object. Most configs extend lighthouse:default to inherit the full default set of audits, artifacts, and categories.
custom-config.js
2

Pass the config to Lighthouse

Use the --config-path flag when running from the CLI, or pass the config as the third argument when using the Node API.

Config properties

extends

Setting extends: 'lighthouse:default' makes your config inherit the default artifacts, audits, groups, and categories. You can then add to or override only what you need.
Config extension is the recommended approach for running custom Lighthouse. Without extends, you must define all artifacts and audits yourself.
extends only supports 'lighthouse:default'. To use other built-in presets such as perf, desktop, or experimental, use the --preset CLI flag or import the config file directly.

settings

The settings object controls runtime behavior. The most commonly used options are:
For the full list of settings options, see the configuration reference.

artifacts

Artifacts are the raw data gathered from a page load. Each artifact is produced by a gatherer. On extension, artifacts are concatenated with the defaults.

audits

The list of audit modules to run. Audits receive artifacts and produce scored results.

categories

Categories group audits and produce an overall score. Each category entry appears in the Lighthouse report with an aggregate score.
Many tools that consume Lighthouse do not need to group or score audit results. In those cases, omitting categories is fine.

groups

Groups control how audits are visually organized within a category in the report.
The report renderer has hardcoded display logic tied to specific group names. Adding arbitrary groups without matching renderer logic may not display as expected.

Built-in presets

Lighthouse ships with several preset configs you can use via the --preset CLI flag:

Config extension

Config extension lets you build on the default Lighthouse setup with minimal boilerplate. When extends: 'lighthouse:default' is set, the default artifacts, audits, groups, and categories are automatically included. You only need to specify what you want to change.
custom-config.js
For more on the full config schema, see the configuration reference.