legacy-dynamic-import-plugin
v1.0.0
Published
A Plugin whick makes the dynamic import of commonjs in webpack@4+ works like previous versions.
Downloads
6
Readme
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
})