-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathvite.config.ts
More file actions
66 lines (65 loc) · 1.64 KB
/
Copy pathvite.config.ts
File metadata and controls
66 lines (65 loc) · 1.64 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
import { defineConfig, loadEnv } from "vite";
import tailwindcss from "@tailwindcss/vite";
import react from "@vitejs/plugin-react";
import path from "path";
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, "./env");
return {
plugins: [react(), tailwindcss()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
envDir: "./env",
server: {
host: true,
open: true,
proxy: {
"/api": {
target: env.VITE_BACKEND_BASE_URL,
changeOrigin: true,
secure: true,
},
"/chats": {
target: env.VITE_CHAT_API_URL,
changeOrigin: true,
secure: true,
rewrite: (path) => path,
},
"/threads": {
target: env.VITE_CHAT_API_URL,
changeOrigin: true,
secure: true,
},
},
},
test: {
environment: "jsdom",
globals: true,
setupFiles: "./src/test-utils/CommonMocks.ts",
coverage: {
provider: "istanbul",
reporter: ["text", "json", "html", "lcov"],
reportsDirectory: "./coverage",
exclude: [
"**/*.ts",
"**/*test.tsx",
"src/config/**",
"src/main.tsx",
"src/App.tsx",
"src/context/**",
"src/utils/**",
"dist/**",
"src/layouts",
"src/components/**",
"src/routes/chat/components/atom/**",
"src/routes/chat/context/**",
"src/routes/chat/hooks/**",
"src/routes/chat/ChatLayout.tsx",
"src/routes/chat/ChatThread.tsx",
],
},
},
};
});