Skip to content

Commit daa7ff8

Browse files
Update README.md (#511)
* Update README.md I did not see the configuration options for failing builds based on score thresholds in the README. Since this is the main documentation for the plugin, I took the liberty of making a pr for updating it. * Update README.md Fixed typos and added options.
1 parent ebec8d0 commit daa7ff8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,18 @@ Updates to `netlify.toml` will take effect for new builds.
148148
locale = "es" # generates Lighthouse reports in Español
149149
```
150150

151+
### Fail Builds Based on Score Thresholds
152+
153+
By default, the Lighthouse plugin will report the findings in the deploy logs. To fail a build based on a specific score, specify the inputs thresholds in your `netlify.toml` file. Set the threshold based on `performance`, `accessibility`, `best-practices`, `seo`, or `pwa`.
154+
155+
```toml
156+
[[plugins]]
157+
package = "@netlify/plugin-lighthouse"
158+
159+
[plugins.inputs.thresholds]
160+
performance = 0.9
161+
```
162+
151163
### Run Lighthouse Locally
152164

153165
Fork and clone this repo.

0 commit comments

Comments
 (0)