devtools icon indicating copy to clipboard operation
devtools copied to clipboard

Compare module sizes between build sessions

Open SaKaNa-Y opened this issue 2 months ago • 1 comments

In the Rolldown panel of Vite DevTools.

Session Compare currently shows size changes for each chunk (output file) between two builds, but it does not directly compare individual source modules.

For example, when index.js grows by 1 KB, users need to find which modules inside it grew. This requires opening the module lists for both builds, searching for the corresponding files, and manually comparing their sizes.

I propose adding module size comparisons to Session Compare, with:

  • The module path, such as src/feature.ts.
  • The module size in each build.
  • The size increase or decrease.
  • Links to the module details in each build.

These are my initial thoughts, and I am happy to work on the implementation. Would love to hear your suggestions!

SaKaNa-Y avatar Oct 03 '26 05:10 SaKaNa-Y

Hi @SaKaNa-Y, thanks for the proposal! I've opened #615 for it. It adds a Modules tab to Session Compare with each module's size in both builds, the size change, and links to each build's module details.

Any feedback is welcome. If you have ideas to improve it, feel free to build on top of the PR.

webfansplz avatar Oct 20 '26 03:10 webfansplz