legacy-dynamic-import-plugin

1.0.0 • Public • Published

legacy-dynamic-import-plugin

make the dynamic import of the commonjs in webpack@4+ works like previous versions.

Usage

// in webpack.conf.js
new LegacyDanamicImportPlugin([
  '/somepath1/foo',
]);
// in somepath1/foo.js
module.exports = () => {
}
// where you dynamic import foo.js
import('./somepath1/foo')
  .then(exports => {
    // do your stuff
  })

Readme

Keywords

Package Sidebar

Install

npm i legacy-dynamic-import-plugin

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

2.82 kB

Total Files

5

Last publish

Collaborators

  • vincent.bian