babel plugin to compile import() syntax to split-require, the commonjs bundle splitting library
v2+ of this plugin works with
split-require@3.1.0and up. Installbabel-plugin-dynamic-import-split-require@1.xif you are using an older version.
npm install babel-plugin-dynamic-import-split-require
In .babelrc:
{
  "plugins": [
    "dynamic-import-split-require"
  ]
}import('whatever').then(onwhatever)var _import = require('split-require');
_import("whatever").then(onwhatever);This code can be bundled by browserify using the split-require plugin.