Using Cypress for E2E tests #125
-
Hi, I am trying to setup Cypress working with this package on Github actions. on Github, when running the tests, the
and sometimes the Vite server restarts:
In this case, the tests failed. I reproduce the issue, locally:
How can we avoid that? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Vite will optimize dependencies as they are being requested. It doesn't know which dependencies need to be optimized until you load the app for the first time. Probably because we're not using the standard Vite index.html file. So there should be some changes we can make to fix this for you with the next release. For now, you can manually point Vite to your client entrypoint using Let me know how it goes. 🤞 |
Beta Was this translation helpful? Give feedback.
Vite will optimize dependencies as they are being requested. It doesn't know which dependencies need to be optimized until you load the app for the first time. Probably because we're not using the standard Vite index.html file. So there should be some changes we can make to fix this for you with the next release.
For now, you can manually point Vite to your client entrypoint using
optimizeDeps.entries
Let me know how it goes. 🤞