Skip to content
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

NFE name is not removed w. es2015 preset #289

Closed
kangax opened this issue Nov 22, 2016 · 4 comments
Closed

NFE name is not removed w. es2015 preset #289

kangax opened this issue Nov 22, 2016 · 4 comments
Labels
bug Confirmed bug
Milestone

Comments

@kangax
Copy link
Member

kangax commented Nov 22, 2016

> babel.transform('var x = { y: function y() {} }', { presets: ['babili'] }).code
'var x={y:function(){}};'
> babel.transform('var x = { y: function y() {} }', { presets: ['babili', 'es2015'] }).code
'"use strict";var x={y:function y(){}};'

Why did we leave y in the 2nd case?

@kangax kangax added the bug Confirmed bug label Nov 22, 2016
@vigneshshanmugam
Copy link
Member

@kangax I will take it :)

@vigneshshanmugam
Copy link
Member

The problem here is..

babel-plugin-transform-es2015-function-name plugin in the es2015 preset adds the function name again to the output.

@kangax
Copy link
Member Author

kangax commented Nov 22, 2016

Ahh.. ok so this works for me. This is a non-issue then.

> require('babel-core').transform('var x = { y: function y() {} }', { presets: ['es2015', 'babili'], passPerPreset: true }).code;

@kangax kangax closed this as completed Nov 22, 2016
vigneshshanmugam added a commit to vigneshshanmugam/babili that referenced this issue Nov 22, 2016
@vigneshshanmugam
Copy link
Member

@kangax i sent a PR anyway to fix this issue.

@boopathi boopathi added this to the 0.0.10 milestone Nov 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug
Projects
None yet
Development

No branches or pull requests

3 participants