Skip to content

fix(mergeConfig): avoiding adding undefined properties#6496

Merged
chenjiahan merged 1 commit intomainfrom
merge_config_1104
Nov 4, 2025
Merged

fix(mergeConfig): avoiding adding undefined properties#6496
chenjiahan merged 1 commit intomainfrom
merge_config_1104

Conversation

@chenjiahan
Copy link
Member

Summary

Avoiding adding undefined dev or output properties when calling the mergeRsbuildConfig method.

Checklist

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

Copilot AI review requested due to automatic review settings November 4, 2025 05:44
@netlify
Copy link

netlify bot commented Nov 4, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 4d8cda1
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/690992d00d04b200088dcc59
😎 Deploy Preview https://deploy-preview-6496--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: 69 (🔴 down 2 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 fixes a bug in the normalizeConfigStructure function where config properties could be lost during normalization. The refactor ensures all original config properties are preserved by creating a shallow copy upfront and only overwriting normalized properties when they exist.

  • Replaced destructuring with rest operator (...rest) with a full shallow copy of the config
  • Changed from conditionally normalizing properties inline to explicitly assigning them back to the config copy
  • Fixed the return statement to return the complete normalized config instead of reconstructing it

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chenjiahan chenjiahan merged commit c0eca94 into main Nov 4, 2025
18 checks passed
@chenjiahan chenjiahan deleted the merge_config_1104 branch November 4, 2025 06:03
@chenjiahan chenjiahan mentioned this pull request Nov 5, 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.

1 participant