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
I have an issue when I'm dealing with a syntax plugin but don't know its associated transformer plugin and vice versa.
My view:
Using plugins listed in stage preset deprecation error message.
Expecting all experimental features to be enabled and configured. But run into:
SyntaxError ... Support for the experimental syntax 'classPrivateMethods' isn't currently enabled ...
...
missingPlugin: [ 'classPrivateMethods' ],
...
Look into documentation, and see
NOTE: transform plugins automatically enable the syntax plugins. So you don't need to specify the syntax plugin if the corresponding transform plugin is used already.
I couldn't initially confirm which transformer if any associated with this syntax plugin. Names were changing in the ecma proposals and proposals were being combined as well.
During that point in time I didn't know which situation I was in:
The stage preset error didn't list all the plugins
Only parsing was supported for private methods and I wouldn't be able to get a transformer
There was a bug in the code
After an hour of researching the ecma repositories and babel github issues and development, I found what I needed: #8130 (comment)
Describe the solution you'd like
A clear and concise description of what you want to happen. Add any considered drawbacks.
Mainly, mimic how proposals are referenced but for the respective feature.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Reference babel's relevant development tracker issue for the relevant feature in progress, in documentation / error messages
Teachability, Documentation, Adoption, Migration Strategy
If you can, explain how users will be able to use this and possibly write out a version the docs.
Maybe a screenshot or design?
And similar solution on the transformer documentation (maybe include into error messages referenced in the issue linked at the top of this post too).
There are further improvements we can do that relate to this issue. But for an easy and effective solution now, we can start with linking the transformers and the plugins where we might need to find them.
The text was updated successfully, but these errors were encountered:
Hey @andrewmiller1! 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.
Support for the experimental syntax 'classProperties' isn't currently enabled (2:5):
1 | class A {
> 2 | x = 2
| ^
3 | }
Add @babel/plugin-proposal-class-properties (https://git.io/vb4SL) to the 'plugins' section of your Babel config to enable transformation.
If you want to leave it as-is, add @babel/plugin-syntax-class-properties (https://git.io/vb4yQ) to the 'plugins' section to enable parsing.
Feature Request
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I have an issue when [...]
You guys have done a fantastic job on babel.
An extension of #6205
I have an issue when I'm dealing with a syntax plugin but don't know its associated transformer plugin and vice versa.
My view:
Using plugins listed in stage preset deprecation error message.
Expecting all experimental features to be enabled and configured. But run into:
Look into documentation, and see
I couldn't initially confirm which transformer if any associated with this syntax plugin. Names were changing in the ecma proposals and proposals were being combined as well.
During that point in time I didn't know which situation I was in:
After an hour of researching the ecma repositories and babel github issues and development, I found what I needed: #8130 (comment)
Describe the solution you'd like
A clear and concise description of what you want to happen. Add any considered drawbacks.
Mainly, mimic how proposals are referenced but for the respective feature.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Reference babel's relevant development tracker issue for the relevant feature in progress, in documentation / error messages
Teachability, Documentation, Adoption, Migration Strategy
If you can, explain how users will be able to use this and possibly write out a version the docs.
Maybe a screenshot or design?
From https://babeljs.io/docs/en/next/babel-parser:
Before
classPrivateMethods
(proposal)class A { #c() {} }
After
classPrivateMethods
(plugin, proposal)class A { #c() {} }
And similar solution on the transformer documentation (maybe include into error messages referenced in the issue linked at the top of this post too).
There are further improvements we can do that relate to this issue. But for an easy and effective solution now, we can start with linking the transformers and the plugins where we might need to find them.
The text was updated successfully, but these errors were encountered: