A js file exports lighthouseReport. This file starts a headless chrome and measure lighthouse score.
This file can also be runned locally as shown below.
> node ./scripts/lighthouse.mjs
-> file:///Users/dmail/jsenv-template-pwa/scripts/lighthouse_report.json
-> file:///Users/dmail/jsenv-template-pwa/scripts/lighthouse_report.html
{
"performance": 0.99,
"accessibility": 0.76,
"best-practices": 0.93,
"seo": 0.85,
"pwa": 0.6
}
lighthouse_report.html can be opened in a browser as shown in screenshot below.
- Remove
"lighthouse"
from"scripts"
in package.json - Delete .github/workflows/pr_impact/report_lighthouse_impact.mjs
- Delete scripts/lighthouse.mjs
- Remove
"@jsenv/lighthouse-impact"
from"devDependencies"
in package.json