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
Remove direct options to @babel/plugin-class-features #9050
Remove direct options to @babel/plugin-class-features #9050
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/9417/ |
What's going to happen when somebody is going to use this plugin directly? As in: {
"plugins": [
"@babel/plugin-class-features"
]
} |
It is a noop. I could throw if you prefer, but I don't think that it is needed. |
IMHO would be good to throw or at least warn the user - somebody mind find this plugin and try to use it manually and be surprised that it's not working. |
It's pretty straightforward to declare what class features you want using plugin-class-features. Why not make this the new way of doing it? I just spent an hour trying to figure out how to do it the "old way" and now I have to give up. Can't see what options could even map to this using what existed before (it had been confusing before anyway). Just a random user's two cents |
Before that {
plugins: [
"@babel/plugin-proposal-private-properties",
"@babel/plugin-proposal-decorators"
]
} Now you should have the same identical config: {
plugins: [
"@babel/plugin-proposal-private-properties",
"@babel/plugin-proposal-decorators"
]
} The two plugins internally use |
@babel/babel If it won't be possible to use this plugin directly, I think that its exisence only creates confusion. WDYT about renaming it to |
Closing, #9083 is better |
This PR removes the ability of using the class-features plugin like this:
Since it could cause problems because it behaves differently from how other plugins behave (see #8130 (comment)).
With this PR only the old packages (
@babel/plugin-proposal-class-properties
, etc) can be used to configure@babel/plugin-class-features
.