Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

Commit 99a0b97

Browse files
committed
Add React Compiler integration to webview-ui
1 parent 8949c2f commit 99a0b97

3 files changed

Lines changed: 43 additions & 8 deletions

File tree

pnpm-lock.yaml

Lines changed: 30 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
"qrcode": "^1.5.4",
5858
"react": "^18.3.1",
5959
"react-dom": "^18.3.1",
60+
"react-compiler-runtime": "^1.0.0",
6061
"react-i18next": "^15.4.1",
6162
"react-markdown": "^9.0.3",
6263
"react-remark": "^2.1.0",
@@ -83,6 +84,7 @@
8384
"zod": "^3.25.61"
8485
},
8586
"devDependencies": {
87+
"babel-plugin-react-compiler": "^1.0.0",
8688
"@roo-code/config-eslint": "workspace:^",
8789
"@roo-code/config-typescript": "workspace:^",
8890
"@testing-library/jest-dom": "^6.6.3",

webview-ui/vite.config.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,17 @@ export default defineConfig(({ mode }) => {
8181
define["process.env.PKG_OUTPUT_CHANNEL"] = JSON.stringify("Roo-Code-Nightly")
8282
}
8383

84-
const plugins: PluginOption[] = [react(), tailwindcss(), persistPortPlugin(), wasmPlugin(), sourcemapPlugin()]
84+
const plugins: PluginOption[] = [
85+
react({
86+
babel: {
87+
plugins: [["babel-plugin-react-compiler", { target: "18" }]],
88+
},
89+
}),
90+
tailwindcss(),
91+
persistPortPlugin(),
92+
wasmPlugin(),
93+
sourcemapPlugin(),
94+
]
8595

8696
return {
8797
plugins,

0 commit comments

Comments
 (0)