babel-plugin-dynamic-import-split-require

babel plugin to compile `import()` syntax to `split-require`, the commonjs bundle splitting library

OTHER License

Downloads
176
Stars
3
Committers
2

babel-plugin-dynamic-import-split-require

babel plugin to compile import() syntax to split-require, the commonjs bundle splitting library

v2+ of this plugin works with [email protected] and up. Install [email protected] if you are using an older version.

Install

npm install babel-plugin-dynamic-import-split-require

Usage

In .babelrc:

{
  "plugins": [
    "dynamic-import-split-require"
  ]
}

Input

import('whatever').then(onwhatever)

Output

var _import = require('split-require');

_import("whatever").then(onwhatever);

This code can be bundled by browserify using the split-require plugin.

License

Apache-2.0

Package Rankings
Top 8.95% on Npmjs.org
Badges
Extracted from project README
npm travis standard