-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.ts
More file actions
81 lines (79 loc) · 1.76 KB
/
vite.config.ts
File metadata and controls
81 lines (79 loc) · 1.76 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
const backendTarget = process.env.VITE_BACKEND_URL || process.env.BACKEND_URL || 'http://127.0.0.1:5000'
export default defineConfig({
plugins: [react(), tailwindcss()],
resolve: {
alias: {
"@": "/src"
}
},
build: {
rollupOptions: {
output: {
manualChunks: {
'vendor': ['react', 'react-dom', 'react-router-dom'],
'markdown': ['markdown-it', 'prismjs', 'dompurify', 'katex']
}
}
},
chunkSizeWarningLimit: 1000
},
server: {
port: 5173,
strictPort: true,
proxy: {
'/api': {
target: backendTarget,
changeOrigin: true,
secure: false,
},
'/chat': {
target: backendTarget,
changeOrigin: true,
secure: false,
},
'/health': {
target: backendTarget,
changeOrigin: true,
secure: false,
},
'/uploads': {
target: backendTarget,
changeOrigin: true,
secure: false,
},
'/images': {
target: backendTarget,
changeOrigin: true,
secure: false,
},
'/sessions': {
target: backendTarget,
changeOrigin: true,
secure: false,
},
'/login': {
target: backendTarget,
changeOrigin: true,
secure: false,
},
'/synthesize': {
target: backendTarget,
changeOrigin: true,
secure: false,
},
'/translate': {
target: backendTarget,
changeOrigin: true,
secure: false,
},
'/canvas-action': {
target: backendTarget,
changeOrigin: true,
secure: false,
},
}
}
})