$ npm install babel-preset-es2015-node
Babel preset for the minimum necessary
babel-preset-es2015
plugins needed for your version of node
This preset automatically determines which version of node you are using via process.version
and sets the minimum necessary babel-preset-es2015
plugins accordingly.
All versions of node ≥4 are supported.
Note: the major version of this package corresponds to the compatible major version of Babel (i.e. use babel-preset-es2015-node@6
with babel-cli@6
.
$ npm install --save-dev babel-preset-es2015-node
.babelrc
(Recommended).babelrc
{
"presets": ["es2015-node"]
}
$ babel script.js --preset es2015-node
require("babel-core").transform("code", {
presets: ["es2015-node"]
});
© 2010 - cnpmjs.org x YWFE | Home | YWFE