@oleg-ch/react-loadable
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

react-loadable

This is still our well-loved React-loadable, thus its API and docs remain valid.

Some of the changes include:

  • webpack plugin was updated and is compatible with Webpack 5
  • babel plugin is compatible with Babel 7
  • added basic tests for webpack & babel plugins
  • required React version is now 17
  • all React deprecations have been removed
  • there are two builds now: esm & cjs, + ts types

TODO:

  • probably should add support for Webpack 4 as well

Installation:

npm i @oleg-ch/react-loadable
yarn add @oleg-ch/react-loadable

Usage:

import Loadable from '@oleg-ch/react-loadable'

Webpack:

import { ReactLoadablePlugin } from '@oleg-ch/react-loadable/cjs/webpack'
import { getBundles } from '@oleg-ch/react-loadable/cjs/webpack'

Babel:

{
    plugins: [
        '@oleg-ch/react-loadable/cjs/babel'
    ]
}

Package Sidebar

Install

npm i @oleg-ch/react-loadable

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

478 kB

Total Files

196

Last publish

Collaborators

  • oleg-ch