Skip to content

feat(builder): add source.reactCompiler to enable React Compiler - #8763

Merged
zllkjc merged 1 commit into
mainfrom
feat/react-compiler
Jul 11, 2026
Merged

zllkjc merged 1 commit into
mainfrom
feat/react-compiler

Conversation

@keepview

@keepview keepview commented Jul 10, 2026

Copy link
Copy Markdown
Contributor
  • bump @rsbuild/plugin-react 2.0.1 -> 2.1.0 in @modern-js/builder and the internal @modern-js/rslib preset (exposes top-level reactCompiler option)
  • add source.reactCompiler (boolean | ReactCompilerOptions) to BuilderConfig and wire it into pluginReact registration in parseCommonConfig; the option is stripped from rsbuildConfig.source and behavior is unchanged when unset
  • rewrite react-compiler guides (zh/en): the feature is opt-in for all React versions including 19; React 18 needs react-compiler-runtime as a runtime dependency plus target: '18'
  • add configure/app/source/react-compiler reference docs (zh/en)
  • switch examples/react-compiler from babel-plugin-react-compiler to source.reactCompiler
  • add builder unit tests (true / object / unset / no source leak) and a tests/integration/react-compiler behavioral smoke (dev + prod: compiler-memoized child must not re-render on parent state update; dev bundle references react/compiler-runtime)

Summary

Related Links

Checklist

  • I have added changeset via pnpm run change.
  • I have updated the documentation.
  • I have added tests to cover my changes.

…Rspack built-in SWC

- bump @rsbuild/plugin-react 2.0.1 -> 2.1.0 in @modern-js/builder and the
  internal @modern-js/rslib preset (exposes top-level reactCompiler option)
- add source.reactCompiler (boolean | ReactCompilerOptions) to BuilderConfig and
  wire it into pluginReact registration in parseCommonConfig; the option is
  stripped from rsbuildConfig.source and behavior is unchanged when unset
- rewrite react-compiler guides (zh/en): the feature is opt-in for all React
  versions including 19; React 18 needs react-compiler-runtime as a runtime
  dependency plus target: '18'
- add configure/app/source/react-compiler reference docs (zh/en)
- switch examples/react-compiler from babel-plugin-react-compiler to
  source.reactCompiler
- add builder unit tests (true / object / unset / no source leak) and a
  tests/integration/react-compiler behavioral smoke (dev + prod: compiler-memoized
  child must not re-render on parent state update; dev bundle references
  react/compiler-runtime)
@changeset-bot

changeset-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0698282

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 118 packages
Name Type
@modern-js/builder Minor
@modern-js/app-tools Minor
@modern-js/plugin-bff Minor
@modern-js/server Minor
@modern-js/plugin Minor
rsc-ssr-app Patch
@modern-js/adapter-rstest Minor
@modern-js/plugin-ssg Minor
@modern-js/plugin-styled-components Minor
@modern-js/plugin-i18n Minor
@modern-js/image Minor
@modern-js/runtime Minor
@modern-js/plugin-polyfill Minor
@integration-test/alias-set Patch
app-document Patch
async-entry-test Patch
tmp Patch
bff-api-app Patch
bff-client-app Patch
bff-indep-client-app Patch
bff-hono Patch
integration-clean-dist-path Patch
integration-compatibility Patch
integration-custom-dist-path Patch
custom-file-system-entry Patch
integration-custom-template Patch
deploy Patch
deploy-server Patch
dev-server Patch
integration-disable-html Patch
entries-app-builder Patch
app-custom-entries Patch
app-custom-routes-runtime Patch
app-custom Patch
app-entry Patch
app-route Patch
app-entry-server Patch
i18n-app-csr-html-lang Patch
i18n-app Patch
i18n-app-ssr-html-lang Patch
i18n-app-ssr Patch
i18n-custom-i18n-wrapper Patch
i18n-mf-app-provider Patch
i18n-mf-component-provider Patch
i18n-mf-consumer Patch
i18n-routes Patch
i18n-routes-ssr Patch
@integration-test/image-component Patch
main-entry-name Patch
nonce Patch
pure-esm-project Patch
react-compiler-test Patch
routes-match Patch
routes Patch
app-rsbuild-hooks Patch
rsc-csr-app Patch
rsc-csr-routes Patch
rsc-ssr-routes Patch
basic-app-rstest-browser Patch
basic-app-rstest Patch
runtime-custom-plugin Patch
runtime-custom-config-plugin Patch
select-mul-entry-test Patch
select-one-entry-test Patch
server-config Patch
server-json-script Patch
server-monitors Patch
server-prod Patch
server-routes Patch
@source-code-build/app Patch
ssg-fixtures-mega-list-routes Patch
ssg-fixtures-nested-routes Patch
ssg-fixtures-simple Patch
ssg-fixtures-web-server Patch
ssr-base-async-entry-test Patch
ssr-base-async-pre-entry-test Patch
ssr-base-json-test Patch
ssr-base-test Patch
ssr-base-fallback-test Patch
init Patch
ssr-base-loadable Patch
ssr-partial-test Patch
rsc-closing-tags-test Patch
ssr-script-loading Patch
ssr-useid-test Patch
ssr-streaming-inline-test Patch
ssr-streaming-lazy-test Patch
ssr-streaming-test Patch
styled-components-stream Patch
styled-components-string Patch
integration-tailwindcss-v2 Patch
integration-tailwindcss-v3 Patch
integration-tailwindcss-v4-tools Patch
integration-tailwindcss-v4 Patch
tmp-dir Patch
write-to-dist Patch
@modern-js/bundle-diff-benchmark Minor
@modern-js/main-doc Minor
@modern-js/tsconfig Minor
@modern-js/plugin-data-loader Minor
@modern-js/render Minor
@modern-js/bff-core Minor
@modern-js/bff-runtime Minor
@modern-js/server-core Minor
@modern-js/create-request Minor
@modern-js/prod-server Minor
@modern-js/server-runtime Minor
@modern-js/server-utils Minor
@modern-js/create Minor
@modern-js/i18n-utils Minor
@modern-js/runtime-utils Minor
@modern-js/sandpack-react Minor
@modern-js/types Minor
@modern-js/utils Minor
@modern-js/rslib Minor
@scripts/prebundle Patch
@scripts/rstest-config Patch
@scripts/release-node Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify

netlify Bot commented Jul 10, 2026

Copy link
Copy Markdown

Deploy Preview for modernjs-byted ready!

Name Link
🔨 Latest commit 0698282
🔍 Latest deploy log https://app.netlify.com/projects/modernjs-byted/deploys/6a50dd5fc73a750009b2e411
😎 Deploy Preview https://deploy-preview-8763--modernjs-byted.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 99 (🟢 up 3 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@zllkjc
zllkjc merged commit 65dd786 into main Jul 11, 2026
10 checks passed
@zllkjc
zllkjc deleted the feat/react-compiler branch July 11, 2026 05:27
@caohuilin caohuilin mentioned this pull request Jul 15, 2026
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

Sponsor
SponsoredKunjungi sekarang
Promo