babel/packages/babel-plugin-transform-es2015-modules-commonjs
Sebastian McKenzie f1ef0ff5e9 Merge pull request #3118 from benjamn/import-hoisting
Add test of import hoisting that fails when the runtime transform is used.
2016-01-19 02:20:17 +00:00
..
2016-01-06 15:34:12 -05:00
2015-10-29 17:51:24 +00:00

babel-plugin-transform-es2015-modules-commonjs

Installation

$ npm install babel-plugin-transform-es2015-modules-commonjs

Usage

.babelrc

{
  "plugins": ["transform-es2015-modules-commonjs"]
}

Via CLI

$ babel --plugins transform-es2015-modules-commonjs script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["transform-es2015-modules-commonjs"]
});