chore: extract rsbuild / rspack config modify into rsbuild plugin#414
Merged
chore: extract rsbuild / rspack config modify into rsbuild plugin#414
Conversation
✅ Deploy Preview for rstest-dev 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 refactors the Rsbuild configuration logic by extracting inline configurations into dedicated plugins, improving code modularity and maintainability.
- Extracts core Rsbuild configurations (environment, output, optimization) into
pluginBasic - Moves external dependency handling logic into
pluginExternalplugin - Updates documentation examples to use proper async/await syntax for
toMatchFileSnapshot
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/core/src/core/rsbuild.ts | Removes inline configuration logic and integrates new plugins |
| packages/core/src/core/plugins/basic.ts | Implements core Rsbuild configurations as a plugin |
| packages/core/src/core/plugins/external.ts | Handles external dependencies and Node.js built-ins |
| tests/snapshot/file.test.ts | Updates test to use proper async/await syntax |
| website/docs/en/api/test-api/expect.mdx | Adds async/await example for toMatchFileSnapshot |
| website/docs/zh/api/test-api/expect.mdx | Adds async/await example for toMatchFileSnapshot |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…-dev/rstest into extract-rsbuild-plugin
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
chore: extract rsbuild / rspack config modify into rsbuild plugin:
pluginBasicPlugin: handle corersbuildconfigurations, including environment setup, output configuration, and optimization settings. This modularizes previously inline configurations.pluginExternalPlugin: manage external dependencies, including automatic handling of Node.js built-ins andnode_modules.Related Links
Checklist