Skip to content
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

Update Babel and rename babel.config.js to babel.config.cjs #6061

Closed
aldeed opened this issue Jan 28, 2020 · 0 comments
Closed

Update Babel and rename babel.config.js to babel.config.cjs #6061

aldeed opened this issue Jan 28, 2020 · 0 comments

Comments

@aldeed
Copy link
Contributor

aldeed commented Jan 28, 2020

The following is logged whenever Babel is involved (running tests mostly):

(node:39890) Warning: require() of ES modules is not supported.require() of babel.config.js from 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 de
fines 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 package.json.

Babel 7.7.0 adds support for .cjs extension: https://github.com/babel/babel/blob/master/CHANGELOG.md#v770-2019-11-05

So the tasks:

  • Update Babel and all related packages to 7.7.0, or as high as we can go without breaking things
  • Rename babel.config.js -> babel.config.cjs to avoid this warning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant