Webpack plugin for creating and reading a react-loadable manifest
npm install @jahredhope/react-loadable-webpack-plugin



A webpack loader to create and read react-loadable compatible manifest files.
react-loadable contains it’s own packaged webpack loader. However some features are not yet available in the packaged version. Once available this package can be deprecated.
- Supports output to webpack assets
- Supports write to disk
PRs, feature requests and bug reports welcome.
``bash`
$ npm install react-loadable @jahredhope/react-loadable-webpack-pluginOR
$ yarn add react-loadable @jahredhope/react-loadable-webpack-plugin
webpack.config.js
`js
const {
ReactLoadablePlugin
} = require("@jahredhope/react-loadable-webpack-plugin");
module.exports = {
// ...
plugins: [
new ReactLoadablePlugin({
filename: "react-loadable.json"
})
]
};
`
src/render.js
`js
const { getBundles } = require("@jahredhope/react-loadable-webpack-plugin");
// ...
function render({ stats }) {
const modules = [];
const appHtml = ReactDOMServer.renderToString(
);
const bundles = getBundles(stats, modules);
return
)};
}
``