Alternative React Compiler setup for Vite does not work (no compiler output) #17591
Replies: 2 comments
-
|
@amir-rahmanii the 1. default filter skips 2. double-transform conflict. the correct setup is to pass the compiler through // vite.config.ts
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [
react({
babel: {
plugins: ['babel-plugin-react-compiler'],
},
}),
],
});this works because no need for ref: react compiler installation docs | @vitejs/plugin-react |
Beta Was this translation helpful? Give feedback.
-
|
el problema suele ser tener el compiler en dos sitios a la vez, en babel y en react plugin. ponlos por separado y verifica con react devtools que aparece el icono del compilador |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
The alternative setup for enabling React Compiler in Vite — as documented here:
https://react.dev/learn/react-compiler/installation#vite
does not work at all.
The documentation suggests using:
Beta Was this translation helpful? Give feedback.
All reactions