@startupjs/babel-plugin-import-to-react-lazy

0.55.8 • Public • Published

@startupjs/babel-plugin-import-to-react-lazy

Transforms exported default import to React.lazy dynamic import.

Example

/* @asyncImports */
export { default as PHome } from './PHome'

↓ ↓ ↓ ↓ ↓ ↓

import { lazy } from 'react'
export const PHome = lazy(() => import('./PHome'))

License

MIT

Package Sidebar

Install

npm i @startupjs/babel-plugin-import-to-react-lazy

Weekly Downloads

217

Version

0.55.8

License

MIT

Unpacked Size

3.79 kB

Total Files

3

Last publish

Collaborators

  • cray0000
  • yska
  • zag2art
  • fctsvirus
  • maestro.sc
  • byshock