babel-plugin-transform-es2015-modules-simple-amd
Limited transformer for ECMAScript 2015 modules (AMD)
Converts this code:
;;; + y;
Into this one:
;
Instead of this one (generated with babel-plugin-transform-es2015-modules-amd
):
;
Other features (like import x as y from 'X'
or import * from 'X'
etc) aren't supported. Just import VARIABLE from 'PATH'
and import 'PATH'
.
Warning. If no import
or export
are presented in JavaScript file, the plugin does nothing (means it doesn't wrap code with define
).
Installation
$ npm install --save-dev babel-plugin-transform-es2015-modules-simple-amd
Usage
.babelrc
(Recommended)
Via .babelrc
Via Node API
;
Thanks to RReverser.