Description
Description
Hey, the vite optimize
command was deprecated in #19348 and I was wondering if it’s possible to reconsider this decision. Here’s my use-case for it:
We use Cypress’ component tests and sometimes run into this issue: cypress-io/cypress#22557
My strategy to avoid it is to have the CI optimize the deps in an early stage of the pipeline (right after installing the deps) and cache the node_modules/.vite
folder. Then Cypress can re-use the optimized deps and the Vite server doesn’t restart (which would cause the current test to fail).
Technically, it would be possible to start the dev server and kill the process after some time, but that’s way clunkier than having a dedicated command that exits after it’s done.
I can totally prepare a PR for it (well, it would basically revert 2906048, unless I’ve missed something).
Thanks!
Suggested solution
Make vite optimize
not deprecated anymore.
Alternative
No response
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.