babel-plugin-transform-es2015-modules-commonjs-optimized
v6.16.0
Published
Optimized version for transform es6 modules to commonjs
Downloads
30
Maintainers
Readme
babel-plugin-transform-es2015-modules-commonjs-optimized
Installation
$ npm install babel-plugin-transform-es2015-modules-commonjs-optimized
Usage
Via .babelrc
(Recommended)
.babelrc
// without options
{
"plugins": ["transform-es2015-modules-commonjs-optimized"]
}
// with options
{
"plugins": [
["transform-es2015-modules-commonjs", {
"allowTopLevelThis": true
}]
]
}
Via CLI
$ babel --plugins transform-es2015-modules-commonjs-optimized script.js
Via Node API
require("babel-core").transform("code", {
plugins: ["transform-es2015-modules-commonjs-optimized"]
});