Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 382 Bytes

File metadata and controls

28 lines (18 loc) · 382 Bytes

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-dynamic-lazy-import"]
}

Example

const component = lazyImport('./xx.js', 'xxChunkFileName')