-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvite.config.ts
More file actions
56 lines (53 loc) · 1.44 KB
/
vite.config.ts
File metadata and controls
56 lines (53 loc) · 1.44 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
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
const BASE_URL = 'http://localhost:8080';
// const BASE_URL = 'https://api.woori-zip.lastdance.store/';
export default defineConfig({
plugins: [react()],
base: '/', // Vercel에서 루트 경로 명시
server: {
// port: 3000,
proxy: {
'/api': {
target: BASE_URL,
changeOrigin: true,
secure: false
},
'/oauth2': {
target: BASE_URL,
changeOrigin: true,
secure: false
},
},
// 개발 서버 최적화
hmr: {
overlay: false
}
},
// 빌드 시에는 프록시 설정 무시됨 (운영환경에서는 실제 도메인 사용)
optimizeDeps: {
exclude: ['lucide-react'],
},
build: {
// 빌드 최적화 설정
rollupOptions: {
output: {
entryFileNames: 'assets/[name].[hash].js',
chunkFileNames: 'assets/[name].[hash].js',
assetFileNames: 'assets/[name].[hash].[ext]',
manualChunks: {
vendor: ['react', 'react-dom'],
router: ['react-router-dom'],
ui: ['framer-motion', 'lucide-react', 'react-hot-toast'],
charts: ['recharts'],
editor: ['react-quill', 'quill'],
dnd: ['react-beautiful-dnd', 'react-dnd', 'react-dnd-html5-backend']
}
},
},
minify: 'terser',
sourcemap: false,
chunkSizeWarningLimit: 1000,
assetsInlineLimit: 0,
},
});