Allow parsing of
lazyImport()
Modules only on demand.
npm install babel-plugin-syntax-dynamic-lazy-import --save-dev
Via .babelrc
or babel-loader.
{
"plugins": ["syntax-dynamic-lazy-import"]
}
const component = lazyImport('./xx.js', 'xxChunkFileName')