babel-plugin-syntax-dynamic-lazy-import
v1.0.0
Published
Allow parsing of lazyImport()
Downloads
2
Readme
babel-plugin-syntax-dynamic-lazy-import
Allow parsing of
lazyImport()
Modules only on demand.
Installation
npm install babel-plugin-syntax-dynamic-lazy-import --save-dev
Usage
Via .babelrc
or babel-loader.
{
"plugins": ["syntax-lazy-import"]
}
Example
Converts
const component = lazyImport('./xx.js')
to
const component = () => import('./xx.js')