In the ground since Tue Oct 01 2024
Last watered inTue Oct 01 2024
Dev Mode
By default, Vite only transpile the code and, no type-checking is performed: https://vitejs.dev/guide/features.html#transpile-only.
One way to set type-checking during dev-mode is using a plugin named:
- Install it.
1yarn add vite-plugin-checker -D
- Plug it on Vite's config
1import { defineConfig } from "vite";
2import react from "@vitejs/plugin-react";
3import checker from "vite-plugin-checker";
4
5export default defineConfig({
6 plugins: [
7 react(),
8 checker({
9 typescript: true,
10 }),
11 ...
12 ],
13});