feat(config): update default performance budgets#13717
Conversation
Deploying rspack with
|
| Latest commit: |
c3bd07b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5c93bad2.rspack-v2.pages.dev |
| Branch Preview URL: | https://chenjiahan-feat-performance.rspack-v2.pages.dev |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates Rspack’s default performance budget thresholds to better match modern bundle sizes, and ensures documentation/types/tests reflect the new defaults while keeping performance hint fixtures stable.
Changes:
- Updated default
performance.maxAssetSize/maxEntrypointSizeto300 * 1024and500 * 1024. - Refreshed surfaced defaults in English/Chinese docs and config type docs.
- Pinned explicit budgets in performance-related stats fixtures to keep warning/error behavior tests deterministic.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| website/docs/zh/config/performance.mdx | Updates displayed default values for performance budget options (ZH). |
| website/docs/en/config/performance.mdx | Updates displayed default values for performance budget options (EN). |
| tests/rspack-test/statsOutputCases/preset-normal-performance/rspack.config.js | Pins explicit budgets to keep performance warning fixture stable. |
| tests/rspack-test/statsOutputCases/preset-normal-performance-ensure-filter-sourcemaps/rspack.config.js | Pins explicit budgets to keep performance warning fixture stable (sourcemaps). |
| tests/rspack-test/statsOutputCases/performance-oversize-limit-error/rspack.config.js | Pins explicit budgets for the error-hints fixture. |
| tests/rspack-test/statsOutputCases/performance-no-hints/rspack.config.js | Pins explicit budgets for the no-hints fixture (avoid inheriting global defaults). |
| tests/rspack-test/statsOutputCases/performance-no-async-chunks-shown/rspack.config.js | Pins explicit budgets for async-chunk related output fixture. |
| tests/rspack-test/statsOutputCases/performance-error/rspack.config.js | Pins explicit budgets for the error-hints fixture. |
| tests/rspack-test/statsOutputCases/performance-different-mode-and-target/rspack.config.js | Pins explicit budgets across multiple target/mode configurations. |
| tests/rspack-test/defaultsCases/mode/undefined.js | Updates defaults snapshot to new computed budget values. |
| tests/rspack-test/defaultsCases/mode/production.js | Updates defaults snapshot to new computed budget values. |
| packages/rspack/src/config/types.ts | Updates documented defaults in the Performance type docs. |
| packages/rspack/src/config/defaults.ts | Implements the new default budget values in config defaults. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📦 Binary Size-limit
🎉 Size decreased by 7.72KB from 49.39MB to 49.39MB (⬇️0.02%) |
This comment was marked as resolved.
This comment was marked as resolved.
Merging this PR will degrade performance by 4.44%
Performance Changes
Comparing |
Rsdoctor Bundle Diff AnalysisFound 6 projects in monorepo, 0 projects with changes. 📊 Quick Summary
Generated by Rsdoctor GitHub Action |
Summary
Update the default performance budgets to
300 * 1024formaxAssetSizeand500 * 1024formaxEntrypointSizeso the defaults better fit modern applications and distinguish asset vs entrypoint limits.Checklist