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