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

Proposal: Group bundles by entry point and display aggregate statistics of selected bundles

Open avin-kavish opened this issue 5 years ago • 7 comments

I use the SplitChunkPlugin to optimize my bundles. Since it splits a single entry point over multiple bundles, the total stat, parsed and gzipped sizes are not that helpful for me. I'm more interested in the size per entry point. It would be nice to have per entry point sizes with the ability to group by entry point on the sidebar so that I can easily switch between them. Currently, I have to read through the list and tick each bundle individually that corresponds to the entry point I'm analysing. Then I have to use a calculator or do the mental math to see how big a single entry point is. It would be nice to see the following information at a glance.

  • Total size of options ticked on the sidebar
  • Option to group bundles by entry point
  • Display stat, parsed, gzipped size for each entry

avin-kavish avatar Jun 30 '19 14:06 avin-kavish

Any thoughts on this?

avin-kavish avatar Jul 30 '19 13:07 avin-kavish

Sounds difficult. I have no idea how much work implementing and supporting this kind of feature would be

valscion avatar Jul 30 '19 13:07 valscion

Maybe as a start, I could do the first bullet point. Show the total of selected options.

avin-kavish avatar Jul 30 '19 13:07 avin-kavish

Sure — would be nice to see what such an UI would look and feel like in practice.

valscion avatar Jul 30 '19 13:07 valscion

Initially I was thinking something like this:

image

Now that I read the other issue, I can update the total near "all" but that would require ticking all again to see the total, losing the custom selection in the process.

avin-kavish avatar Aug 02 '19 03:08 avin-kavish

The list of chunks might be quite long -- will people notice this total count if it's in the bottom?

Still, would be an improvement on the current UI

valscion avatar Aug 02 '19 07:08 valscion

Hi @valscion, I opened a PR which allows user to filter per entry point. Here’s the PR: #519

pas-trop-de-zele avatar Aug 17 '22 20:08 pas-trop-de-zele

I'll close this issue as the original feature request seems done by https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/519

valscion avatar Feb 23 '23 09:02 valscion