When using netlify build locally, I always get the following error:
Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct URL and that the server is properly responding to all requests. (Status code: 404)
I know this is because the Lighthouse package installed in my netlify.toml file:
Hi, @andylemaire. The workflow I would use is to use two copies of that TOML file and swap the default one for one missing the package = "@netlify/plugin-lighthouse" lines when building locally. I would do so using scripts bundled with the repo itself not manually (although, you could do it manually if you wanted to).