|
1
|
/// <reference types="vite/client" /> |
|
2
|
|
|
3
|
import react from "@vitejs/plugin-react" |
|
4
|
// Imported from `vitest/config`, not `vite`: Vitest 4 no longer augments Vite's |
|
5
|
// `UserConfig` with a `test` property, so `/// <reference types="vitest" />` plus |
|
6
|
// Vite's own `defineConfig` no longer typechecks. |
|
7
|
import { defineConfig } from "vitest/config" |
|
8
|
|
|
9
|
export default defineConfig({ |
|
10
|
plugins: [react()], |
|
11
|
test: { |
|
12
|
setupFiles: "./setup-test.ts", |
|
13
|
coverage: { |
|
14
|
reporter: ["lcov", "text"], |
|
15
|
include: ["src/**"], |
|
16
|
exclude: ["**/*.stories.tsx", "**/index.ts"], // exclude stories and index files |
|
17
|
}, |
|
18
|
globals: true, |
|
19
|
environment: "jsdom", |
|
20
|
css: false, |
|
21
|
}, |
|
22
|
}) |