-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Cypress component test produces "@vitejs/plugin-react can't detect preamble. Something is wrong" #9362
Comments
Cypress does not support Vite 3 yet: cypress-io/cypress#22784 Closing for the reason above but feel free to create a new issue if it turns out that this is a bug in Vite. |
I found the problem, we will support soon (maybe next release, that's usually biweekly). FYI PR: cypress-io/cypress#22915 FYI this was the problem, Vite 3.x had some breaking changes around For now, you might need to stay on Vite 2. This should be released very soon in Cypress 👍 |
Oh, that's great. Yes. This one, I think. |
Found another work around:
essentially:
|
Just wait for the next Cypress patch release - cypress-io/cypress#22915 is merged, which fixes the issue. |
Describe the bug
I maintain an app skeleton with Vite, React, and optional Cypress support. Since the upgrade to Vite3, I get the "@vitejs/plugin-react can't detect preamble. Something is wrong" failure message when running the Cypress component tests. It used to work fine with Vite2.
Reproduction
https://github.com/froko/vite-ts-react/tree/cypress-vite-3
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: