TypeScript
You can use TypeScript checker for vanilla TypeScript project or React project.
Installation
Make sure typescript is installed as a peer dependency.
Add
typescript
field to plugin config.jsexport default { plugins: [checker({ typescript: true /** or an object config */ })], }
Configuration
Advanced object configuration table of options.typescript
.
field | Type | Default value | Description |
---|---|---|---|
root | string | Vite config root | Root path to find tsconfig file |
tsconfigPath | string | "tsconfig.json" | Relative tsconfig path to root |
buildMode | boolean | false | Add --build to tsc flag, note that noEmit does NOT work if buildMode is true (#36917) |