Skip to content

feat: support displaying the total size diff#6706

Merged
chenjiahan merged 5 commits intomainfrom
total_size_diff_1204
Dec 4, 2025
Merged

feat: support displaying the total size diff#6706
chenjiahan merged 5 commits intomainfrom
total_size_diff_1204

Conversation

@chenjiahan
Copy link
Member

Summary

Add support for displaying the total size diff:

File (web)                             Size                   Gzip
dist/static/css/index.54800c1b.css     0.34 kB (+0.34 kB)     0.25 kB (+0.25 kB)
dist/index.html                        0.37 kB (+0.12 kB)     0.25 kB (+0.05 kB)
dist/static/js/index.f31cb805.js       1.3 kB (+1.3 kB)       0.76 kB (+0.74 kB)
dist/static/js/lib-react.6cc087e6.js   189.8 kB (+189.8 kB)   59.9 kB (+59.9 kB)

                              Total:   191.8 kB (+191.6 kB)   61.2 kB (+61.0 kB)

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings December 4, 2025 11:25
@netlify
Copy link

netlify bot commented Dec 4, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 0745306
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/6931a039c1361c000806d5aa
😎 Deploy Preview https://deploy-preview-6706--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 70 (🟢 up 3 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for displaying size difference information in the total row of the file size output, complementing the existing per-file diff display. The implementation tracks total sizes across builds and shows diffs for both regular and gzipped sizes when diff mode is enabled.

Key Changes

  • Introduced SizeSnapshot type to encapsulate file sizes along with aggregate total and gzip sizes
  • Extended diff display to show total size changes (e.g., Total: 191.8 kB (+191.6 kB))
  • Added gzip total diff display in detail mode for comprehensive size tracking

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@andrzej-erli
Copy link

Hi, I'd like to know, whether this feature supports multiple configurations? Docs https://rsbuild.rs/config/performance/print-file-size mention only one file <root>/node_modules/.cache/rsbuild/file-sizes.json but I run multiple configurations using the same node_modules, eg. rsbuild build -c scripts/config/rsbuild.config.mts rsbuild build -c server/rsbuild.config.mts etc.

@chenjiahan
Copy link
Member Author

This feature works across multiple environments, but it doesn't support multiple Rsbuild configurations yet. I can add support for that.

@chenjiahan chenjiahan merged commit 7296479 into main Dec 4, 2025
11 checks passed
@chenjiahan chenjiahan deleted the total_size_diff_1204 branch December 4, 2025 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants