kcg-ai-monitoring/frontend/vite.config.ts
Nan Kyung Lee 49cee6c5e0 fix(backend): PredictionAlert 직렬화 500 에러 수정 + 로컬 프록시 Origin 헤더 보정
- PredictionAlert.event Lazy 연관 필드에 @JsonIgnore 추가 (Jackson 직렬화 실패 방지)
- Vite 프록시에 Origin 헤더 재작성 추가 (로컬 개발 시 CSRF 403 방지)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 20:34:56 +09:00

44 lines
1.2 KiB
TypeScript

import { defineConfig } from 'vite'
import path from 'path'
import tailwindcss from '@tailwindcss/vite'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [
react(),
tailwindcss(),
],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'@lib': path.resolve(__dirname, './src/lib'),
'@shared': path.resolve(__dirname, './src/shared'),
'@features': path.resolve(__dirname, './src/features'),
'@data': path.resolve(__dirname, './src/data'),
'@stores': path.resolve(__dirname, './src/stores'),
},
},
server: {
port: 5173,
proxy: {
'/api': {
target: process.env.VITE_API_PROXY ?? 'https://kcg-ai-monitoring.gc-si.dev',
changeOrigin: true,
secure: false,
headers: {
Origin: process.env.VITE_API_PROXY ?? 'https://kcg-ai-monitoring.gc-si.dev',
},
},
},
},
build: {
rollupOptions: {
input: {
main: path.resolve(__dirname, 'index.html'),
systemFlow: path.resolve(__dirname, 'system-flow.html'),
designSystem: path.resolve(__dirname, 'design-system.html'),
},
},
},
})