Babel preset for all es2015 plugins without transform-es2015-function-name.
Excluded plugin causes next transformation:
var b = {
a: function() {
return 1;
}
};
to:
var b = {
a: function a() {
return 1;
}
};
In angular2 beta 7 it lead to infinity loop with crash. Excluding this plugin may help.
$ npm install --save-dev babel-preset-es2015-without-function-name
.babelrc
{
"presets": ["es2015-without-function-name"]
}
$ babel script.js --presets es2015-without-function-name
require("babel-core").transform("code", {
presets: ["es2015-without-function-name"]
});