webpack-visualizer
webpack-visualizer copied to clipboard
Webpack 5 compatibility issues
Since webpack has changed some plugin hooks, this plugin is no longer compatible with the newer versions. the culprit is the line
compiler.plugin('emit', (compilation, callback) => {
who conflicts with the new hooks and throw an error during bundiling.
To implement the plugin now is needed
compiler.hooks.emit.tapAsync
While I was there I got carried away and I've standardized the development environment and updated the packages to the latest versions, some of these like React required some code adaptations (the core is untouched)
Since this project seems unmaintained, I published a new working fork of that, if you need it use
npm i -D webpack-visualizer-plugin2
it works with webpack 5x