Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wotermelon/babel-plugin-syntax-dynamic-lazy-import
Modules is loaded as needed.
https://github.com/wotermelon/babel-plugin-syntax-dynamic-lazy-import
Last synced: about 1 month ago
JSON representation
Modules is loaded as needed.
- Host: GitHub
- URL: https://github.com/wotermelon/babel-plugin-syntax-dynamic-lazy-import
- Owner: wotermelon
- Created: 2018-05-10T03:23:35.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-07-11T06:20:23.000Z (over 6 years ago)
- Last Synced: 2024-12-05T05:04:24.361Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# babel-plugin-syntax-dynamic-lazy-import
> Allow parsing of `lazyImport()`
Modules only on demand.
## Installation
```bash
npm install babel-plugin-syntax-dynamic-lazy-import --save-dev
```## Usage
Via `.babelrc` or babel-loader.
```json
{
"plugins": ["syntax-dynamic-lazy-import"]
}
```## Example
```js
const component = lazyImport('./xx.js', 'xxChunkFileName')
```