-
Notifications
You must be signed in to change notification settings - Fork 3.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 dev server optimize entries #18261
Comments
We should be concat-ing with the optimizeDeps, not overwriting. Good catch, will look into both these. |
@edikdeisling @lmiller1990 I'm fixing this, just testing: with result on @edikdeisling fork: |
@lmiller1990 in a few minutes a PR on EDIT: just ignore the above and below comments about the solution on Windows, I don't know why my
|
The code for this is done in cypress-io/cypress#18286, but has yet to be released. |
BTW we now use |
So can we close this @JessicaSachs ? |
Closing as addressed in #18286 |
Current behavior
I have a problems with component tests
If I add node_modules dependency into support file - this dependency wouldn't be pre-bundled by Vite. This is because Cypress pass
supportFile
into optimizeDeps.entries as is - and this is wrong for windows.cypress/npm/vite-dev-server/src/startServer.ts
optimizeDeps.entries
is array of fast-glob patternsDesired behavior
All node_modules dependencies which are imported inside
supportFile
must be pre-bundled on windows tooTest code to reproduce
I've created repo to reproduce this
https://github.com/edikdeisling/test-cypress-cmp-tests-pre-bundling
Make sure there is no .vite in node_modules and run
yarn test:component:run
Cypress Version
8.4.1
Other
There is another issue here to be honest. I think this is wrong to rewrite
optimizeDeps.entries
. Because of this behaviour I can't add my ownoptimizeDeps.entries
The text was updated successfully, but these errors were encountered: