babel-plugin-strip-requirejs-plugin-prefix
v1.0.0
Published
Strips off plugin prefixes from all define and require calls
Downloads
367
Readme
Babel Remove RequireJS plugin prefixes
This is a Babel plugin for removing the plugin prefixes from module requirements in require
and define
calls.
What it does
It turns define or require calls like this:
define(['es6!some-module-1', 'normal-module'], function () { ... })
into
define(['some-module-1', 'normal-module'], function () { ... })
Pretty simple huh!
Installation
First install via npm, or add to your package.json
npm install --save-dev babel-plugin-strip-requirejs-plugin-prefix
Then in your babel configuration, add 'strip-requirejs-plugin-prefix'
to your set of plugins:
{
'plugins': [
['strip-requirejs-plugin-prefix', { plugin: 'es6'}]
]
}
License
See LICENSE.md