-
-
Notifications
You must be signed in to change notification settings - Fork 754
perf: disable output.pathinfo by default
#12306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for rspack ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
output.pathinfo by defaultoutput.pathinfo by default
There was a problem hiding this 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 disables output.pathinfo by default in Rspack to reduce bundle bloat in development mode. Since Rspack already sets moduleId: 'named' by default in development, the pathinfo comments provide duplicate metadata. The change simplifies generated code and improves readability.
Key changes:
- Changed default value of
output.pathinfofrom development-dependent tofalse - Updated documentation to reflect new default behavior and provide clear guidance
- Updated all test snapshots to reflect removed pathinfo comments (reducing file sizes by ~60-80 bytes per module)
Reviewed changes
Copilot reviewed 170 out of 170 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
packages/rspack/src/config/defaults.ts |
Core change: sets output.pathinfo default to false instead of development mode dependent |
website/docs/en/config/output.mdx |
Updated English documentation with new default, clearer descriptions, and examples |
website/docs/zh/config/output.mdx |
Updated Chinese documentation with new default, clearer descriptions, and examples |
tests/rspack-test/defaultsCases/mode/development.js |
Removed pathinfo from development mode diff expectations |
tests/rspack-test/defaultsCases/cache/cache-filesystem-dev.js |
Removed pathinfo from cache filesystem development mode expectations |
| Various snapshot files (200+) | Updated to reflect removal of pathinfo comments in generated output |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📦 Binary Size-limit
🙈 Size remains the same at 47.67MB |
CodSpeed Performance ReportMerging #12306 will not alter performanceComparing Summary
|
Summary
In development mode, Rspack already sets
moduleId: 'named'by default. Enablingoutput.pathinfoadds duplicate metadata on top of that, which leads to unnecessary output bloat.This PR disables
output.pathinfoby default in development to keep the generated code cleaner and easier to read.Before
After
Checklist