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
Class features loose should have precedence over preset-env #11634
Class features loose should have precedence over preset-env #11634
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/23191/ |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit cc1e1c9:
|
if (loose) file.set(looseKey, file.get(looseKey) | feature); | ||
if ( | ||
loose === | ||
"#__internal__@babel/preset-env__prefer-true-but-false-is-ok-if-it-prevents-an-error" |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
packages/babel-helper-create-class-features-plugin/src/features.js
Outdated
Show resolved
Hide resolved
…s.js [skip ci] Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
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.
Learned a good lesson when we have option constraints between plugins.
Thought about this a bit... I think this is fine. Can we possibly emit a warning when the loose mode from |
@existentialism I have added the warning. You can see in the tests added in the last commit that it can still be explicitly silenced by explicitly enabling the plugins with the correct loose mode. |
Is it possible to show them which plugin overrode? I think something like:
Might be slightly more helpful in both letting them know what is going on, and how to fix it. |
Better? |
I think it is, you? We might be able to shorten it, but thats more bikeshedding for later. I think it describes the problem well and how to fix it. |
Yeah, we don't need to shorten it. It's more important to exactly explain what's going on and how to fix it. |
Please suggest me a better method to fix this if possible 😭