Skip to content

chore: update the Rslib React Compiler example to use SWC#477

Merged
Timeless0911 merged 1 commit into
mainfrom
chore/rslib-react-compiler-swc
Jun 30, 2026
Merged

chore: update the Rslib React Compiler example to use SWC#477
Timeless0911 merged 1 commit into
mainfrom
chore/rslib-react-compiler-swc

Conversation

@elecmonkey

Copy link
Copy Markdown
Member

Summary

This PR updates the rslib/react-compiler example to use the Rust-powered React Compiler provided by @rsbuild/plugin-react instead of the previous Babel-based setup.

It removes @rsbuild/plugin-babel and babel-plugin-react-compiler, upgrades the example to @rsbuild/plugin-react@^2.1.0 and @rslib/core@^0.23.1, and enables React Compiler through pluginReact({ reactCompiler: true }).

Validation

  • pnpm --filter "@rslib-example/react-compiler" build

@elecmonkey elecmonkey marked this pull request as ready for review June 30, 2026 09:40
@elecmonkey elecmonkey requested a review from Timeless0911 June 30, 2026 09:40
@Timeless0911 Timeless0911 merged commit 725df00 into main Jun 30, 2026
4 checks passed
@Timeless0911 Timeless0911 deleted the chore/rslib-react-compiler-swc branch June 30, 2026 09:41
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 22fad09a-ca6d-4bbb-8f9c-8cb2249651e5

📥 Commits

Reviewing files that changed from the base of the PR and between ff70854 and 08b2530.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • rslib/react-compiler/package.json
  • rslib/react-compiler/rslib.config.ts

📝 Walkthrough

Walkthrough

The React Compiler integration in rslib/react-compiler is migrated from a Babel-based approach to a native plugin option. In package.json, @rsbuild/plugin-babel and babel-plugin-react-compiler are removed, and @rsbuild/plugin-react and @rslib/core are upgraded to ^2.1.0 and ^0.23.1 respectively. In rslib.config.ts, the pluginBabel import and its configuration block are removed, replaced by a single pluginReact({ reactCompiler: true }) call.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: the example is updated from Babel-based React Compiler wiring to the SWC/Rsbuild React Compiler path.
Description check ✅ Passed The description accurately summarizes the dependency and config changes and includes the validation command.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/rslib-react-compiler-swc

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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