Skip to content

Conversation

@chenjiahan
Copy link
Member

Summary

I originally named the configuration option for createRsbuild as rsbuildConfig to make it clear that it was specific to Rsbuild (and not Rspack or other tools).

Over time, though, I realized the name is unnecessarily long—especially in e2e tests where I have to type rsbuildConfig repeatedly.

This PR shortens it to config for simplicity. The old rsbuildConfig name will still work for now but is planned for deprecation in the future.

Checklist

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

Copilot AI review requested due to automatic review settings September 24, 2025 13:58
@netlify
Copy link

netlify bot commented Sep 24, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 23d085c
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/68d3f8feba020800081e7c0e
😎 Deploy Preview https://deploy-preview-6245--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: 58 (🔴 down 12 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 simplifies the configuration option name for createRsbuild by introducing config as a more concise alternative to the existing rsbuildConfig option. The change maintains backward compatibility by keeping both options available, with rsbuildConfig marked for future deprecation.

  • Adds a new config option to CreateRsbuildOptions interface
  • Updates the internal implementation to prefer config over rsbuildConfig using nullish coalescing
  • Updates CLI initialization to use the new config option

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/core/src/types/rsbuild.ts Adds the new config option and marks rsbuildConfig as deprecated
packages/core/src/createRsbuild.ts Updates implementation to support both options with preference for config
packages/core/src/cli/init.ts Updates CLI to use the new config option

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@chenjiahan chenjiahan merged commit ea05b11 into main Sep 24, 2025
12 checks passed
@chenjiahan chenjiahan deleted the create_rsbuild_option_0924 branch September 24, 2025 14:09
@chenjiahan chenjiahan mentioned this pull request Sep 29, 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.

2 participants