-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Labels
Has PRoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue
Description
Feature Request
Is your feature request related to a problem? Please describe.
If you have Node 13 and babel.config.js file in a package with type=module then Node will emit a warning:
(node:22720) Warning: require() of ES modules is not supported.
require() of /home/spyke/Projects/undercut/packages/undercut/babel.config.js from /home/spyke/Projects/undercut/node_modules/@babel/core/lib/config/files/configuration.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename babel.config.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /home/spyke/Projects/undercut/packages/undercut/package.json.
Describe the solution you'd like
The solution should be renaming babel.config.js into babel.config.cjs, but it isn't supported by Babel yet.
Describe alternatives you've considered
I've considered ignoring this warning, but it is annoying.
Teachability, Documentation, Adoption, Migration Strategy
The solution has no braking changes. Documentation changes are minimal: adding another possible name for config file.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Has PRoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue