-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Vite 3] Babel Bug #8868
Comments
It works with Vite 2.9.13+ plugin-react v2.0.0-alpha.2 I feel #5313 is affecting this.
AFAIK it is because fast-refresh and automatic runtime is not supported by esbuild. |
That fixes the error and makes the client-side build work, but the server-side build fails with:
You can reproduce by setting Shall I open a new bug report for this? |
@brillout Yes, I guess there is a different bug. Would you create it? |
Done: #8880. Let me know if there is anything I can do to help. |
In case you are wondering why |
This bug also happens with |
Fixed in |
Describe the bug
It seems that, in some scenarios, the babel plugin is trying to parse TypeScript code even though it's not configured to be able to parse TypeScript. Which breaks both dev and build.
The same code does work with Vite 2.
This is a blocker for building Vike Frameworks. (And, AFAICT there is no workaround for this bug, but I could be wrong.)
The bug reproduction is minimal but uses VikePress; let me know if you want more minimal reproduction that doesn't use VikePress.
This is the last bug for making Vite 3 + vite-plugin-ssr green again 🎉.
(I'm curious what the reason is for using Babel since esbuild supports JSX.)
Reproduction
https://github.com/brillout/vite-3-babel-bug
System Info
Used Package Manager
pnpm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: