Skip to content

feat(rolldown): expose unchanged comparison members and metric scope - #632

Draft
SaKaNa-Y wants to merge 3 commits into
vitejs:mainfrom
SaKaNa-Y:feat/compare-module-context
Draft

SaKaNa-Y wants to merge 3 commits into
vitejs:mainfrom
SaKaNa-Y:feat/compare-module-context

Conversation

@SaKaNa-Y

@SaKaNa-Y SaKaNa-Y commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

A chunk can grow while its members keep the same transform sizes. Following that chunk into Modules produces an empty list, even when a search matches a member. The header counts every module in the graph but sums sizes only for output-chunk members.

Add All and Unchanged views to the module comparison. Search by path or package and filter by a chunk from either session. Each session header shows its output-chunk member count and total transformed code size. The view explains that missing transform sizes count as 0 B in comparisons and totals.

Changed chunk → Modules → All or Unchanged → Session A or B detail

Merged PR #615 added the Modules tab for the build comparison requested in issue #601, which is now closed. I closed my earlier PR #631 because switching to rendered module sizes would have prevented users from comparing older logs that contain only transform measurements. This PR builds on #615 and keeps those comparisons available.

Evidence

  • On the same saved builds, a chunk grew from 39 B to 198 B. The previous Modules view showed no members. In Chromium, All showed both members and searching Unchanged found lib.js. Each header showed 2 compared modules and 277 B, including after filtering to one row.
  • Chromium showed the zero-value explanation for two missing measurements (0 B on both sides, classified as Unchanged) and for a missing measurement compared with 39 B (a +39 B change).
  • The count test expects 1 and 2 members when a module joins, and 2 and 1 when one leaves. In a temporary copy, forcing both counts to read Session A failed the test.
  • Lint, type checking and all seven build tasks passed. The full test run passed 408 tests and skipped 2.

Merge Danger

Door: two-way

Blast Radius: Rolldown module comparison

An incorrect filter can hide a member, and an incorrect count can mislead a build comparison. Users can inspect the original sessions. This change affects the comparison UI and leaves the stored build data intact.

@pkg-pr-new

pkg-pr-new Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@vitejs/devtools

npm i https://pkg.pr.new/@vitejs/devtools@632

@vitejs/devtools-kit

npm i https://pkg.pr.new/@vitejs/devtools-kit@632

@vitejs/devtools-oxc

npm i https://pkg.pr.new/@vitejs/devtools-oxc@632

@vitejs/devtools-rolldown

npm i https://pkg.pr.new/@vitejs/devtools-rolldown@632

@vitejs/devtools-vite

npm i https://pkg.pr.new/@vitejs/devtools-vite@632

@vitejs/devtools-vitest

npm i https://pkg.pr.new/@vitejs/devtools-vitest@632

commit: da47f2d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant