vite-plugin-ts-checker
Vite plugin that runs TypeScript type checker on a separate process.
Features
- ⚡️ Out of the box
- 💚 Support Vue3 with vue-tsc (build mode only for now)
- 🚥 Vite HMR overlay
- 🎳 Serve & build mode (TypeScript)
Usage
Install
Install plugin
npm i vite-plugin-ts-checker -D
Install peer dependencies
vite-plugin-ts-checker
requires
to be installed as peer dependency.
Add to vite.config.js
import TsChecker from 'vite-plugin-ts-checker'
export default {
plugins: [TsChecker()],
}
Options
export interface PluginOptions {
checker: 'tsc' | 'vue-tsc'
enableBuild: boolean
overlay: boolean
root: string
tsconfigPath: string
}
Examples
Run projects in examples/*
to try it out.
pnpm i
cd ./examples/<ONE_EXAMPLE>
npm run dev
Roadmap
License
MIT