-
-
Notifications
You must be signed in to change notification settings - Fork 249
perf: disable bundler info injection #5476
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 rsbuild ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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 the default BundlerInfo injection in Rspack to reduce bundle size.
- Adds
rspackFuture.bundlerInfo.force = falsein the basic plugin when using Rspack - Updates snapshot tests across environments, default, builder, and basic suites to include the new experiments block
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/core/src/plugins/basic.ts | Inject rspackFuture.bundlerInfo.force = false when bundler is Rspack |
| packages/core/tests/__snapshots/environments.test.ts.snap | Added default rspackFuture.bundlerInfo in snapshots |
| packages/core/tests/__snapshots/default.test.ts.snap | Added default rspackFuture.bundlerInfo in snapshots |
| packages/core/tests/__snapshots/builder.test.ts.snap | Added default rspackFuture.bundlerInfo in snapshots |
| packages/core/tests/__snapshots/basic.test.ts.snap | Added default rspackFuture.bundlerInfo in snapshots |
Comments suppressed due to low confidence (2)
packages/core/src/plugins/basic.ts:94
- Add unit tests to verify behavior when
rspackFuture.bundlerInfo.forceis set totrueorfalse, ensuring that injection is correctly applied or omitted in each case.
if (api.context.bundlerType === 'rspack') {
packages/core/src/plugins/basic.ts:96
- [nitpick] Spreading
chain.get('experiments')performs a shallow merge of experiment flags. Consider using a deep-merge utility orchain.mergeto preserve nested experiment settings correctly.
...chain.get('experiments'),

Summary
This PR disables the default bundler info injection to reduce bundle size. This removes the Rspack version information from the bundle code and is not noticeable to users.
Related Links
bundlerInfo.forceis false rspack#10783Checklist