babel-preset-es6-node6
v0.5.0
Published
Babel preset to make node@6 fully ES2015 compatible.
Downloads
10
Maintainers
Readme
babel-preset-es6-node6
Babel preset to make node@6 fully ES2015 compatible.
Node@6 has great ES2015 support, this module just adds missing features:
- modules (transform-es2015-modules-commonjs)
- unicode & sticky regular expressions (transform-es2015-sticky-regex & transform-es2015-unicode-regex)
Install
npm install --save-dev babel-preset-es6-node6
Usage
Read "Configuring Babel 6" article for more information about babel@6 configuration.
Via .babelrc
(recommended)
.babelrc
{
"presets": ["es6-node6"]
}
Via CLI
babel script.js --presets es6-node6
Via Node API
require('babel-core').transform('code', {
presets: ['es6-node6'],
})