vue-tsc --noEmit: Typecheck Vue SFCs
vue-tsc --noEmit type-checks a Vue project, including expressions inside <template>, without emitting any files.
Vite builds Vue without type checking, so vue-tsc is the dedicated typecheck gate. It wraps tsc with Vue SFC awareness.
What it does
vue-tsc runs the TypeScript compiler with Vue SFC support so it checks types in <script> and the bindings used in <template>. With --noEmit it only reports errors, making it a pure gate.
Common usage
vue-tsc --noEmit
vue-tsc --noEmit -p tsconfig.app.json
# typical CI script: typecheck, then build
vue-tsc --noEmit && vite buildOptions
| Flag | What it does |
|---|---|
| --noEmit | Check types only, write nothing |
| -p, --project <f> | Use a specific tsconfig |
| --build, -b | Build-mode for project references |
| --skipLibCheck | Skip type-checking .d.ts files (faster) |
In CI
Run vue-tsc --noEmit as a step before or beside vite build so template type errors fail CI; vite build alone will not catch them. Match the tsconfig used by the app (often tsconfig.app.json in Vite scaffolds) or you check the wrong files.
Common errors in CI
Template binding errors appear as standard TS codes, e.g. "error TS2339: Property \"x\" does not exist on type ...", pointing into a .vue file. A version mismatch between vue-tsc and the vue-tsc-required TypeScript can throw "Search string not found" or crash; keep them in sync. "TS18003: No inputs were found" means the tsconfig include globs match no files.