Skip to content

goto-bus-stop/babel-plugin-dynamic-import-split-require

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 split-require@3.1.0 and up. Install babel-plugin-dynamic-import-split-require@1.x if you are using an older version.

npm travis standard

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published