-
Notifications
You must be signed in to change notification settings - Fork 15
/
vite.config.ts
54 lines (52 loc) · 1.59 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// vite.config.ts
/// <reference types="vite/client" />
/// <reference types="vitest" />
import path from "path";
import { visualizer } from "rollup-plugin-visualizer";
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
export default defineConfig({
resolve: {
alias: {
"@": path.resolve(__dirname, "src"),
"@assets": path.resolve(__dirname, "src/assets"),
"@components": path.resolve(__dirname, "src/components"),
"@constants": path.resolve(__dirname, "src/constants"),
"@hooks": path.resolve(__dirname, "src/hooks"),
"@pages": path.resolve(__dirname, "src/pages"),
"@styles": path.resolve(__dirname, "src/styles"),
"@utils": path.resolve(__dirname, "src/utils"),
},
},
plugins: [
react(),
visualizer({
filename: "./analyze/stats.html", // Path to visualizer output
template: "treemap", // Visualization types
open: true, // Automatically open the visualization in the browser
gzipSize: true, // Show the compressed size
brotliSize: true, // Show the Brotli compressed size
}),
],
server: {
open: true,
},
test: {
globals: true,
environment: "jsdom",
reporters: ["default", "junit"],
outputFile: { junit: "./reports/junit/junit.xml" },
setupFiles: ["vitest.setup.ts"],
coverage: {
provider: "istanbul",
include: ["src/**/*"],
exclude: ["src/**/*.test.ts*", "src/main.tsx", "src/App.tsx"],
reporter: ["text", "json-summary"],
thresholds: {
perFile: false,
statements: 50,
lines: 50,
},
},
},
});