Plugs tsc --watch into Vite dev server, enabling TypeScript type-checking during development without blocking the build pipeline. Current stable version is 3.1.2 (Feb 2025), with releases roughly every 6 months tracking Vite and TypeScript peer updates. Key differentiators: dev-only, low-noise (no overlay), uses Vite's dev server for logging, lightweight compared to alternatives like fork-ts-checker-webpack-plugin. Supports TS solution config and ESM-only since v3.
npm install vite-plugin-tsc-watchVerified import paths — ran on the pinned version, not inferred.
Import the named export `tscWatch` and add it to the Vite plugins array.
Use `import { tscWatch } from 'vite-plugin-tsc-watch'` instead of default import.Switch to ESM imports or migrate Vite to ESM (see Vite migration guide).
Upgrade to Vite 4+ and Node 18+.
Rename `tscPlugin` to `tscWatch` in your imports.
Add `"noEmit": true` to `compilerOptions` in your tsconfig.json.
Replace `import tscWatch from ...` with `import { tscWatch } from 'vite-plugin-tsc-watch'`.Switch to ESM import or use dynamic import: `const { tscWatch } = await import('vite-plugin-tsc-watch')`.Run `npm install -D typescript vite` to install peer dependencies.