babel-plugin-transform-system-import-commonjs
Babel plugin that transforms ES2015 System.import into CommonJS require.
Deprecation notice
** Since import() proposal was accepted, System.import
function now is obsolete and this plugin is not recommended to use in new projects. Please use import()
function with babel-plugin-transform-import-commonjs instead. **
How this works
This plugin transforms
var myModule = "./path/to/myModule"; System;
to
var myModule = "./path/to/myModule"; { ;};
Requirements
You need support for Promise, use polyfill if needed.
Installation
$ npm install babel-plugin-transform-system-import-commonjs
Usage
.babelrc
(Recommended)
Via .babelrc
"plugins": "transform-system-import-commonjs"
Via CLI
$ babel --plugins transform-system-import-commonjs script.js
Via Node API
;