@loadable/webpack-plugin

LoadablePlugin

Create a webpack loadable plugin.

ArgumentsDescription
optionsOptional options
options.filenameStats filename (default to loadable-stats.json)
options.writeToDiskAccepts boolean or object. Always write stats file to disk. Default to false.
options.writeToDisk.filenameWrite assets to disk at given filename location
new LoadablePlugin({ filename: 'stats.json', writeToDisk: true })

Writing file to disk can be useful if you are using razzle or webpack-dev-server.