-
Notifications
You must be signed in to change notification settings - Fork 27
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
Conflict with transform-es2015-function-name
#15
Comments
@stephank Go ahead and open a ticket upstream with Babel. This indeed looks like a bug with Our unit tests already have another (different) conflict with this transform, and I disable it in most cases by creating a modified es2015 preset that does not include that transformation. Obviously, I do not expect users to need to jump through this hoop in real-world scenarios, so I'm considering this a bug. |
They didn't outright close it, but did sort of bounce the issue back here: babel/babel#4782 For what it's worth, for us specifically, this is rather low prio. It's fairly easy to work around. :) |
Thanks for taking the time to open the ticket. I'll follow up with the Babel folks. |
I think I am having a similar problem. For me, it looks like a combination of The shortest code I could come up with to demonstrate was:
Output:
If I remove either
whereas with just
Investigating the issue drove me to this plugin, which I am thinking about using. The stability is slightly worrying (before I will also try @shmod's suggestion and blacklist |
Run the following:
Expected output is the unchanged input:
But instead we get the following:
In a real-world project, we use webpack with babel-loader in a config like:
Where the
es2015
preset containstransform-es2015-function-name
.But this results in some of our controllers not being able to find certain dependencies.
Not sure if this is an upstream bug, or if this should be dealt with here. The generated code is otherwise valid, and I guess upstream could argue that nothing is wrong here.
This is on babel 6.18.0 and babel-plugin-transform-es2015-function-name 6.9.0. Our app, where we get the missing dependency errors, uses babel-plugin-angularjs-annotate 0.6.0.
Some more scenario's:
The text was updated successfully, but these errors were encountered: