Skip to content

Add watch mode and an on-success command to vp check #3218

Description

@nshiab

Description

I use Vite Plus to format, lint, and type-check TypeScript scripts before running them with Node or Bun.
Currently, vp check has no watch mode or success hook, so this workflow requires a separate watcher. vp pack offers these options, but introduces a build step that isn’t needed when running TypeScript directly.

Related to #1117 and #3141.

Suggested solution

Support something like:

vp check --fix --watch --on-success "node src/main.ts"

On startup and after file changes:

  • Run the configured formatting, linting, and type checks.
  • Run or restart the command only when checks pass.
  • Avoid redundant reruns caused by --fix modifying watched files.
    It would also be useful to watch additional files, such as .env, that can affect execution without being TypeScript inputs.

Alternative

No response

Additional context

No response

Validations

  • Read the Contributing Guidelines.
  • Confirm this request is for Vite+ itself and not for Vite, Vitest, tsdown, Rolldown, or Oxc.
  • Check that there isn't already an issue requesting the same feature.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Fields

    Priority

    None yet

    Start date

    None yet

    Target date

    None yet

    Effort

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions