Skip to content

feat(core): expose modifyRsbuildConfig method in instance#5898

Merged
chenjiahan merged 2 commits intomainfrom
modify_rsbuild_config_0820
Aug 20, 2025
Merged

feat(core): expose modifyRsbuildConfig method in instance#5898
chenjiahan merged 2 commits intomainfrom
modify_rsbuild_config_0820

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

@chenjiahan chenjiahan commented Aug 20, 2025

Summary

Expose the modifyRsbuildConfig plugin API in the Rsbuild instance.

This allows upper-level tools like Rslib or Rstest to more easily add some configuration merging logic.

Checklist

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

Copilot AI review requested due to automatic review settings August 20, 2025 13:44
@netlify
Copy link
Copy Markdown

netlify bot commented Aug 20, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 4a6a2f6
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/68a5d453a42ff200082bb868
😎 Deploy Preview https://deploy-preview-5898--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: 57 (🔴 down 17 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
Copy Markdown
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 exposes the modifyRsbuildConfig plugin API directly on the Rsbuild instance, allowing upper-level tools like Rslib or Rstest to more easily add configuration merging logic without needing to create plugins.

Key changes:

  • Added modifyRsbuildConfig method to the RsbuildInstance type definition
  • Exposed the method from globalPluginAPI in the instance creation
  • Added documentation for the new API in both English and Chinese

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/core/src/types/rsbuild.ts Added modifyRsbuildConfig to the RsbuildInstance type definition
packages/core/src/createRsbuild.ts Exposed modifyRsbuildConfig from globalPluginAPI and reorganized property order
website/docs/en/api/javascript-api/instance.mdx Added English documentation for the new API method
website/docs/zh/api/javascript-api/instance.mdx Added Chinese documentation for the new API method
e2e/cases/javascript-api/instance-api/index.test.ts Added E2E test to verify the new API functionality

@chenjiahan chenjiahan changed the title feat(core): expose modifyRsbuildConfig in instance feat(core): expose modifyRsbuildConfig method in instance Aug 20, 2025
@chenjiahan chenjiahan merged commit 4673032 into main Aug 20, 2025
11 checks passed
@chenjiahan chenjiahan deleted the modify_rsbuild_config_0820 branch August 20, 2025 14:07
@chenjiahan chenjiahan mentioned this pull request Aug 21, 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