Closed guilhermesimoes closed 1 year ago
What did you expect to have? Do note that the "without BannerPlugin" image does not show what the size of src is
You can see on the second image that a lot of code from src
is simply missing.
The expected parsed size is something like 450kB.
Hmm yeah, I think the way we parse bundles requires the first thing in the bundle to be the start of a webpack module. So using something like BannerPlugin
would indeed break things.
Source: https://github.com/webpack-contrib/webpack-bundle-analyzer/blob/v4.8.0/src/parseUtils.js
If this is the case, then this turns to a feature request to support BannerPlugin
. You can open a feature request over at the Discussions "Ideas" category here: https://github.com/webpack-contrib/webpack-bundle-analyzer/discussions/categories/ideas
Done! Here's the feature request: https://github.com/webpack-contrib/webpack-bundle-analyzer/discussions/601
I'm closing this issue then. Thank you for your guidance 🙏
Thank you for opening the feature request ☺️. It's easier to triage issues when feature requests are in discussions instead.
Issue description
Adding the following
BannerPlugin
to a build:changes the results of webpack-bundle-analyzer.
Without using
BannerPlugin
:Using
BannerPlugin
: These results are wrong (just look at the size ofsrc
).Do note that this happens with an entry point that is a Worker, I did not verify if this also happens with other kinds of entry points.
Technical info
Debug info
I use this module as a plugin, without any options: