Related plugins
Describe the bug
The following pattern is tedious and I think it's safe to skip babel-plugin-react-compiler for non client transform.
|
react({ |
|
babel: { plugins: ['babel-plugin-react-compiler'] }, |
|
}).map((p) => ({ |
|
...p, |
|
applyToEnvironment: (e) => e.name === 'client', |
|
})), |
For RSC, react compiler transform actually breaks app. For SSR, there's no benefit of react compiler and it should be skipped to avoid unnecessary transform.
Reproduction
https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-rsc/e2e/starter.test.ts
Steps to reproduce
No response
System Info
Used Package Manager
npm
Logs
No response
Validations
Related plugins
plugin-react
plugin-react-swc
plugin-react-oxc
plugin-rsc
Describe the bug
The following pattern is tedious and I think it's safe to skip
babel-plugin-react-compilerfor non client transform.vite-plugin-react/packages/plugin-rsc/e2e/starter.test.ts
Lines 106 to 111 in 73d457b
For RSC, react compiler transform actually breaks app. For SSR, there's no benefit of react compiler and it should be skipped to avoid unnecessary transform.
Reproduction
https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-rsc/e2e/starter.test.ts
Steps to reproduce
No response
System Info
Used Package Manager
npm
Logs
No response
Validations