Repository navigation
[ENHANCEMENT] Enable React Compiler for all plugins - #878
Merged
Merged
Conversation
Upgrade Rsbuild to v2 and enable the React Compiler through pluginReact({ reactCompiler }) for the module
federation bundles and through .swcrc for the library build. Plugins target React 18 and depend on
react-compiler-runtime. Keep the previous browserslist since Rsbuild 2 raised its default targets.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Gladorme
force-pushed
the
feat/react-compiler
branch
from
October 21, 2026 12:49
1c29fa9 to
35147c8
Compare
Gladorme
marked this pull request as ready for review
October 21, 2026 12:50
Nexucis
reviewed
Oct 22, 2026
Nexucis
left a comment
Member
There was a problem hiding this comment.
🤖 This review was generated by GitHub Copilot (AI assistant), on behalf of the reviewer.
Thanks for this, overall it looks good to me 👍 A few non-blocking suggestions inline.
What was verified (PR checked out locally, compared against origin/main)
- All 33 plugin packages get
react-compiler-runtime+pluginReact({ reactCompiler })(onlye2eis untouched, as expected). - The compiler is effectively applied in both outputs:
- ESM lib (
build:esmvia.swcrc): intable, 15/30 emitted files import{ c as _c } from "react-compiler-runtime"(the only non-compiled file with JSX isbootstrap.js, which is fine). - MF bundles (
rsbuild build):memo_cache_sentinelpresent in the output.
- ESM lib (
react-compiler-runtimeis correctly independencies(the publishedlib/imports it), and its peer range (react ^17 || ^18 || ^19) matches.- No need to add it to MF
shared: it's stateless and itsreactimport resolves to the shared singleton. tsc -p tsconfig.jsonpasses onrsbuild.shared.ts+ allrsbuild.config.tsagainst Rsbuild v2 types; no removed v2 options in use.- Bundle size (
tableMF build): 8328 → 8343 kB raw / 3478 → 3467 kB gzip, i.e. negligible. - The oxlint config already enforces the compiler-derived rules (
react/hooks,react/memo-dependencies,react/unsupported-syntax,react/todo…) and there's nouse no memo/ hooks-rule suppression in the sources, so the codebase is in good shape for this.
Other notes
- Vitest does not run the compiler, so unit tests exercise the uncompiled code; compiler-specific regressions would only be caught by e2e/manual testing. Lint rules mitigate this, but it may be worth mentioning in the release notes.
- Minor: the PR checklist is unchecked and the screenshot has no caption explaining what it shows.
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Nexucis
approved these changes
Oct 22, 2026
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.
Description
Upgrade Rsbuild to v2 and enable the React Compiler through pluginReact({ reactCompiler }) for the module federation bundles and through .swcrc for the library build. Plugins target React 18 and depend on react-compiler-runtime.
Screenshots
Checklist
[<catalog_entry>] <commit message>naming convention using one of thefollowing
catalog_entryvalues:FEATURE,ENHANCEMENT,BUGFIX,BREAKINGCHANGE,DOC,IGNORE.UI Changes