|
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
|
resolve: { |
|
12
|
alias: { |
|
13
|
"@/blocks": "/src/blocks", |
|
14
|
"@/components": "/src/components", |
|
15
|
"@/providers": "/src/providers", |
|
16
|
"@/hooks": "/src/hooks", |
|
17
|
"@/utils": "/src/utils", |
|
18
|
"@/types": "/src/types", |
|
19
|
}, |
|
20
|
}, |
|
21
|
test: { |
|
22
|
setupFiles: "./setup-test.ts", |
|
23
|
coverage: { |
|
24
|
reporter: ["lcov", "text"], |
|
25
|
include: ["src/**"], |
|
26
|
exclude: ["**/*.stories.tsx", "**/index.ts"], // exclude stories and index files |
|
27
|
}, |
|
28
|
globals: true, |
|
29
|
environment: "jsdom", |
|
30
|
css: false, |
|
31
|
}, |
|
32
|
}) |