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
Tweak preset-env corejs/useBuiltIns warning and error messages #9716
Conversation
existentialism
commented
Mar 20, 2019
Q | A |
---|---|
Fixed Issues? | |
Patch: Bug Fix? | N |
Major: Breaking Change? | N |
Minor: New Feature? | N |
Tests Added + Pass? | Y/Y |
Documentation PR Link | |
Any Dependency Changes? | |
License | MIT |
558a71c
to
6b0a1bb
Compare
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/10556/ |
"core-js version. Currently, we assume version 2.x when no version " + | ||
"is passed. Since this default version will likely change in future " + | ||
"versions of Babel, we recommend explicitly setting the core-js version " + | ||
"you are using via the `corejs` option.\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also say they users should be sure that they have the correct version of core-js in their dependencies.
For example, angular-cli
was broken by the core-js@3 release because they were relying on core-js@2
being in node_modules
without specifying it in dependencies
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"you are using via the `corejs` option.\n", | |
"you are using via the `corejs` option.\n" + | |
"You should also be sure that the version you pass to the `corejs` " + | |
"option matches the version specified in your `package.json`'s " + | |
"`dependencies` section. If it doesn't, you need to run one of the " + | |
"following commands:\n\n" + | |
" npm install --save core-js@2 npm install --save core-js@3\n" + | |
" yarn add core-js@2 yarn add core-js@3\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
6b0a1bb
to
7fb4842
Compare
The corejs mentioned in this new warning message is undocumented: https://babeljs.io/docs/en/babel-preset-env |
Doc PR at babel/website#1987 |