Skip to content

Un-deprecate the vite optimize command #20004

Closed as not planned
Closed as not planned
@soetz

Description

@soetz

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions