Skip to content

Conversation

@chenjiahan
Copy link
Member

@chenjiahan chenjiahan commented Nov 11, 2025

Summary

Handle undefined values in mergeRsbuildConfig to ensure compatibility with the behavior prior to Rsbuild 1.6.

Related Links

resolve #6549

Checklist

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

Copilot AI review requested due to automatic review settings November 11, 2025 02:49
@netlify
Copy link

netlify bot commented Nov 11, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit f042098
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/6912a4c36fab43000758b449
😎 Deploy Preview https://deploy-preview-6550--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: 59 (🔴 down 10 from production)
Accessibility: 97 (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.

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 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 of RsbuildConfig[]
  • 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.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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>
@chenjiahan chenjiahan merged commit b95e736 into main Nov 11, 2025
11 checks passed
@chenjiahan chenjiahan deleted the merge_config_undefined_1111 branch November 11, 2025 03:04
@chenjiahan chenjiahan mentioned this pull request Nov 12, 2025
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.

[Bug]: mergeRsbuildConfig fails when entire config parameter is undefined (regression from 1.5 -> 1.6)

2 participants