feat(create-rsbuild): add React Compiler support for React templates#7329
feat(create-rsbuild): add React Compiler support for React templates#7329chenjiahan merged 1 commit intomainfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new feature to Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds support for React Compiler in create-rsbuild for React 19 templates. The changes are well-structured, including new template files, configuration updates, e2e tests, and documentation. However, there's a critical issue with the version of babel-plugin-react-compiler specified in the new package.json files, which appears to be unpublished and would cause project creation to fail. Additionally, the documentation could be more precise about which React templates support this new feature. My review includes suggestions to address these points.
Deploying rsbuild with
|
| Latest commit: |
9be4095
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d31d9b5f.rsbuild-v2.pages.dev |
| Branch Preview URL: | https://react-compiler-template-0313.rsbuild-v2.pages.dev |
There was a problem hiding this comment.
Pull request overview
Adds a new react-compiler optional tool to create-rsbuild so React templates can be scaffolded with React Compiler (Babel plugin) integration, and updates the quick-start docs to mention the new option.
Changes:
- Introduce a new
react-compilerextra tool increate-rsbuildthat merges in a template overlay (config + devDependencies). - Add new
template-react-compileroverlays forreact-jsandreact-ts. - Update EN/ZH quick-start docs and add e2e coverage for the new tool behavior.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| website/docs/zh/guide/start/quick-start.mdx | Mentions React Compiler as an optional tool and lists react-compiler in CLI docs. |
| website/docs/en/guide/start/quick-start.mdx | Same as above for English docs. |
| packages/create-rsbuild/template-react-compiler/react-ts/rsbuild.config.ts | Adds Rsbuild config overlay enabling babel-plugin-react-compiler via @rsbuild/plugin-babel. |
| packages/create-rsbuild/template-react-compiler/react-ts/package.json | Adds devDependencies needed for React Compiler Babel integration (TS overlay). |
| packages/create-rsbuild/template-react-compiler/react-js/rsbuild.config.js | Adds Rsbuild config overlay enabling babel-plugin-react-compiler (JS overlay). |
| packages/create-rsbuild/template-react-compiler/react-js/package.json | Adds devDependencies needed for React Compiler Babel integration (JS overlay). |
| packages/create-rsbuild/src/index.ts | Registers the react-compiler extra tool and copies the appropriate overlay into the generated project. |
| e2e/cases/create-rsbuild/tools.test.ts | Adds scaffolding tests for react-compiler and verifies it’s ignored for non-React templates. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Checklist