> 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 I will take it :)
The problem here is..
babel-plugin-transform-es2015-function-name plugin in the es2015 preset adds the function name again to the output.
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 i sent a PR anyway to fix this issue.
Most helpful comment
@kangax I will take it :)