webpack-contrib / webpack-bundle-analyzer

Webpack plugin and CLI utility that represents bundle content as convenient interactive zoomable treemap
MIT License
12.58k stars 488 forks source link

Chart assets created by child compilations #368

Closed lemonmade closed 4 years ago

lemonmade commented 4 years ago

This plugin currently only traverses the assets in the main compilation (unless there are no assets in the main compilation, in which case it tries to use the first child). Several plugins, like worker-plugin, can generate an additional asset graph that is entirely hidden from analysis. It would be great to have some way of inspecting those assets, too.

I had a need for this recently (to investigate the contents of a web worker asset created via a custom Webpack plugin). The following changeset was able to show the child compilation assets locally: https://github.com/webpack-contrib/webpack-bundle-analyzer/compare/master...lemonmade:add-child-compilations?expand=1. I imagine that change probably breaks other things, but it was nice that it was at least relatively easy to mess with the code and have it work.

th0r commented 4 years ago

Could you create a minimal reproduction?

masterkidan commented 4 years ago

@th0r @lemonmade i believe I’ve referenced a minimal repro in #150 and a potential fix in #376

lemonmade commented 4 years ago

Thanks @masterkidan, my issue does appear to be a duplicate of the one you've referenced, and the provided example is very much in line with what I am after. Will close this issue in favor of that one!