Skip to content

chore: extract rsbuild / rspack config modify into rsbuild plugin#414

Merged
9aoy merged 6 commits intomainfrom
extract-rsbuild-plugin
Jul 24, 2025
Merged

chore: extract rsbuild / rspack config modify into rsbuild plugin#414
9aoy merged 6 commits intomainfrom
extract-rsbuild-plugin

Conversation

@9aoy
Copy link
Copy Markdown
Collaborator

@9aoy 9aoy commented Jul 23, 2025

Summary

chore: extract rsbuild / rspack config modify into rsbuild plugin:

  • pluginBasic Plugin: handle core rsbuild configurations, including environment setup, output configuration, and optimization settings. This modularizes previously inline configurations.
  • pluginExternal Plugin: manage external dependencies, including automatic handling of Node.js built-ins and node_modules.

Related Links

Checklist

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

Copilot AI review requested due to automatic review settings July 23, 2025 08:43
@netlify
Copy link
Copy Markdown

netlify bot commented Jul 23, 2025

Deploy Preview for rstest-dev ready!

Name Link
🔨 Latest commit 7f171f2
🔍 Latest deploy log https://app.netlify.com/projects/rstest-dev/deploys/6880a4aa2a08aa000877a60e
😎 Deploy Preview https://deploy-preview-414--rstest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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 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 pluginExternal plugin
  • 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

9aoy and others added 5 commits July 23, 2025 16:44
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>
@9aoy 9aoy merged commit 104f765 into main Jul 24, 2025
16 checks passed
@9aoy 9aoy deleted the extract-rsbuild-plugin branch July 24, 2025 03:15
@9aoy 9aoy mentioned this pull request Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants