This repository was archived by the owner on Sep 2, 2023. It is now read-only.
This repository was archived by the owner on Sep 2, 2023. It is now read-only.
Script-based configuration files in "type": "module" packages #389
Closed
Description
Tracking issue specifically for the ESLint issue that was raised here - eslint/eslint#12319.
Tooling often rely on configuration scripts. Examples include .eslintrc.js
, karma.conf.js
, webpack.config.js
, babel.config.js
to name a few.
These tools typically load those configuration files with a require
.
When an existing project with such a configuration adds "type": "module"
to the package.json, they get the ERR_REQUIRE_ESM dual hazard error that we added recently in nodejs/node#29492.
The ideal upgrade path is to have the tools support using import()
for loading their configurations. Alternatively they could support .cjs
as well.
We should probably reach out with this information to tools and get further feedback as well.
Metadata
Metadata
Assignees
Labels
No labels