A Vite plugin (v1.8.0) that watches specified files and runs a package.json script when changes are detected. Built on top of chokidar, it supports glob patterns, debouncing, and console output customization. Part of the KitQL ecosystem, it is actively maintained with regular releases. Unlike using chokidar directly, it integrates seamlessly into the Vite dev server lifecycle.
npm install vite-plugin-watch-and-runVerified import paths — ran on the pinned version, not inferred.
Watches CSS files for changes and runs the build:css script.
Review glob patterns. Any glob that relied on micromatch-specific features may need adjustment.
Set `delay` to a value high enough to coalesce rapid changes (e.g., 500).
Remove this option from your configuration; it is no longer supported.
Verify the script exists in your package.json under `scripts`.
Use `import watchAndRun from 'vite-plugin-watch-and-run'` instead.
Run `npm install vite-plugin-watch-and-run --save-dev` and ensure Vite is installed.
Use default import: `import watchAndRun from 'vite-plugin-watch-and-run'`.