webpack-bundle-analyzer icon indicating copy to clipboard operation
webpack-bundle-analyzer copied to clipboard

[Nice to Have] plugin should use webpack InfrastructureLogger and output report to compiler.outputFileSystem

Open wood1986 opened this issue 3 years ago • 1 comments

Issue description

There are 2 issues for the plugin code(not bin/analyzer). Currently, it is not a bug but nice to have

  1. BundleAnalyzerPlugin.js should use InfrastructureLogger from webpack compiler. When I run my jest test, there are some noise message from the plugin. See the following screenshot. image I can silent the console.log for my jest test. But I have to write some to find the plugin in my shared webpack.config.js and then replace the existing plugin with another one to silent log messages.
  2. When I launch the webpack-dev-server, I expect my dist should be empty. Currently it always has report.html. Other assets are in memfs. I have a jest test to check the folder is empty. Now I have to write more code to handle it differently image

wood1986 avatar Oct 11 '21 08:10 wood1986

There's this issue already open for the first case: https://github.com/webpack-contrib/webpack-bundle-analyzer/issues/358

And this is related to the second case: https://github.com/webpack-contrib/webpack-bundle-analyzer/issues/471

valscion avatar Oct 11 '21 10:10 valscion