-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
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 patterns
Desired behavior
All node_modules dependencies which are imported inside supportFile must be pre-bundled on windows too
Test 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 own optimizeDeps.entries
