rollup-plugin-visualizer
rollup-plugin-visualizer copied to clipboard
Measure percentages against only the included files, not all files
I know exclude
and include
are still quite new, so you may have this planned, but it would be nice for the stats to measure up against purely the included files, not any excluded.
For example, if I end up excluding something that's 20% of the bundle, it would be nice if the remaining values added up to 100%, as that 20% is no longer being counted.
Thanks for all your work!
Hi, it makes sense. Need to think only if it should be default or it should be an option. Not yet sure.
@btd I think it's should be default include all entries files.
In my case, we use Vite
to bundle web, and the dist folder has multiple vendor files(include support legacy like ie11). When I include this plugin to analyze, it includes all. So hope you can implement this feature! Thanks
@harrytran998 I think what you're describing is more like #105. What I was talking about here is updating the percentages based on the modules included.
@harrytran998 this plugin works with output chunks not with files. Meaning in this context your feature request is irrelevant. Also you always can filter out chunks
I added to plugin and generated files option to include/exclude bundles, files in all bundles or files in specific bundles. When it is done in plugin it is not included in generated file at all. When file not included it is not appeared in generated file and thus its size is not added. I also decided to do not change size if frontend filtering applied. I tried to use it when developing and it confused me at least twice when i forgot this is implemented.
Fair enough, makes sense. Thanks for the consideration anyways!