Skip to content

Commit 0049ede

Browse files
In-linehannesrudolph
authored andcommitted
Add React Compiler integration to webview-ui
1 parent d7fa963 commit 0049ede

File tree

3 files changed

+42
-7
lines changed

3 files changed

+42
-7
lines changed

pnpm-lock.yaml

Lines changed: 29 additions & 6 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
@@ -58,6 +58,7 @@
5858
"qrcode": "^1.5.4",
5959
"react": "^18.3.1",
6060
"react-dom": "^18.3.1",
61+
"react-compiler-runtime": "^1.0.0",
6162
"react-i18next": "^15.4.1",
6263
"react-icons": "^5.5.0",
6364
"react-markdown": "^9.0.3",
@@ -85,6 +86,7 @@
8586
"zod": "^3.25.61"
8687
},
8788
"devDependencies": {
89+
"babel-plugin-react-compiler": "^1.0.0",
8890
"@roo-code/config-eslint": "workspace:^",
8991
"@roo-code/config-typescript": "workspace:^",
9092
"@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)