New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESM support (incl. lighthouserc.mjs + lighthouserc.cjs) #973
Comments
Lighthouse CI doesn't yet support ESM GoogleChrome/lighthouse-ci#973
Lighthouse CI doesn't yet support ESM GoogleChrome/lighthouse-ci#973
Lighthouse CI doesn't yet support ESM GoogleChrome/lighthouse-ci#973
|
+1 -- I have a custom Lighthouse config in my
Trying Update: Renaming to |
Is your feature request related to a problem? Please describe.
Currently, running
lhci autorun
in an ESM project causesERR_REQUIRE_ESM
failures, because the configuration file is beingrequire()
d:Describe the solution you'd like
It would be nice to be able to use Lighthouse CI in ESM projects (eg. projects specifying
"type": "module"
inpackage.json
):lighthouserc.js
when"type": "module"
specified inpackage.json
lighthouserc.mjs
for CommonJS projects who want to opt in to ESM in this one filedone in feat: support cjs config file extension #650 and docs: add *.cjs to supported config extensions #975lighthouserc.cjs
for ESM projects who want to stay with the current CommonJS configThe currently supported configuration files:
.lighthouserc.js
lighthouserc.js
.lighthouserc.json
lighthouserc.json
.lighthouserc.yml
lighthouserc.yml
.lighthouserc.yaml
lighthouserc.yaml
Describe alternatives you've considered
Not having ESM support (having to use JSON config files in ESM projects)
Additional context
Lighthouse itself switched to ESM in this umbrella issue managed by @connorjclark
The text was updated successfully, but these errors were encountered: