feat(core): expose modifyRsbuildConfig method in instance#5898
Merged
chenjiahan merged 2 commits intomainfrom Aug 20, 2025
Merged
feat(core): expose modifyRsbuildConfig method in instance#5898chenjiahan merged 2 commits intomainfrom
chenjiahan merged 2 commits intomainfrom
Conversation
✅ Deploy Preview for rsbuild ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
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
modifyRsbuildConfigmethod to theRsbuildInstancetype definition - Exposed the method from
globalPluginAPIin 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Expose the
modifyRsbuildConfigplugin API in the Rsbuild instance.This allows upper-level tools like Rslib or Rstest to more easily add some configuration merging logic.
Checklist