1.0.0 • Published 7 years ago
babel-plugin-syntax-dynamic-lazy-import v1.0.0
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')
1.0.0
7 years ago