docs: example for lighthouse using headers

This commit is contained in:
soulgalore 2024-08-21 07:55:31 +02:00
parent a431f80a8b
commit 7b6e3d61c9
1 changed files with 8 additions and 1 deletions

View File

@ -53,10 +53,17 @@ module.exports = {
};
```
You can also add Lighthouse flags by a JSON file ```--lighthouse.flags flag.json```.
You can also add Lighthouse flags by a JSON file ```--lighthouse.flags flag.json```. If you pass on command like flags that contains hyphens, they are removed and converted internally in Lighthouse, so for example to get the command line flag `--extra-headers` to work, the JSON should be like this:
```JSON
{
"extraHeaders": { "key": "value"}
}
```
Read all about configuring Lighthouse at [https://github.com/GoogleChrome/lighthouse/blob/master/docs/configuration.md](https://github.com/GoogleChrome/lighthouse/blob/master/docs/configuration.md).
## Disable GPSI
If you only want to run Lighthouse and not GPSI you can disable it with `----plugins.remove @sitespeed.io/plugin-gpsi`.