-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
35 lines (32 loc) · 904 Bytes
/
vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/// <reference types="vitest" />
/// <reference types="vite/client" />
import react from "@vitejs/plugin-react-swc";
import { defineConfig } from "vite";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
resolve: { alias: [{ find: "@/", replacement: "/src/" }] },
test: {
globals: true,
name: "happy-dom",
environment: "happy-dom",
setupFiles: "./src/setup-tests.ts",
coverage: {
all: true,
enabled: true,
provider: "v8",
exclude: [
"**/index.ts",
"**/*{.,-}{test,spec,types,stories,constants,d}.?(c|m)[jt]s?(x)",
],
include: ["src/components/**/*.?(c|m)[jt]s?(x)"],
branches: 80,
functions: 80,
lines: 80,
statements: -10,
},
// you might want to disable it, if you don't have tests that rely on CSS
// since parsing CSS is slow
// css: true,
},
});