-
-
Notifications
You must be signed in to change notification settings - Fork 237
fix: handle undefined values in mergeRsbuildConfig #6550
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 updates mergeRsbuildConfig to handle undefined values in its parameter list, restoring compatibility with behavior prior to Rsbuild 1.6.
Key changes:
- Updated function signature to accept
(RsbuildConfig | undefined)[]instead ofRsbuildConfig[] - Added filtering logic to remove undefined values before processing
- Adjusted length check to return empty object when all values are undefined
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/core/src/mergeConfig.ts | Updated implementation to filter undefined values and handle empty config arrays |
| packages/core/tests/mergeConfig.test.ts | Added comprehensive test coverage for undefined value handling |
| website/docs/en/api/javascript-api/core.mdx | Updated English documentation with new type signature |
| website/docs/zh/api/javascript-api/core.mdx | Updated Chinese documentation with new type signature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Summary
Handle undefined values in
mergeRsbuildConfigto ensure compatibility with the behavior prior to Rsbuild 1.6.Related Links
resolve #6549
Checklist