-
-
Notifications
You must be signed in to change notification settings - Fork 164
Open
Labels
Description
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.
vite-plugin-react/packages/plugin-rsc/e2e/starter.test.ts
Lines 106 to 111 in 73d457b
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
na
Used Package Manager
npm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.