You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Hey @the-spyke! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.
If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite."
Activity
babel-bot commentedon Oct 23, 2019
Hey @the-spyke! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.
If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite."
JLHwung commentedon Oct 23, 2019
As a workaround, you can pass
--config-fileto@babel/cli: