kcg-monitoring/frontend/vite.config.ts
htlee e196ee292c feat: korea-layers-enhancement 이관 — 이란 시설 deck.gl SVG 전환 + AI 챗 + 아이콘 품질 통합
이란 시설 deck.gl 전환:
- OilFacilityLayer/AirportLayer/MEFacilityLayer/MEEnergyHazardLayer → IconLayer(SVG) + TextLayer
- 26개 고유 SVG 아이콘 (배경 원형 + 색상 테두리 + 고유 실루엣)
- ReplayMap/SatelliteMap: DeckGLOverlay + 줌 스케일 + 통합 팝업

한국 군사/정부/NK 아이콘 SVG 업그레이드:
- createMilitaryLayers: 군사기지 5종 + 정부기관 7종 + NK 발사장 7종 → SVG IconLayer

라벨 가독성 개선 (이란/한국 공통):
- TextLayer fontSettings: { sdf: true } + outlineWidth: 8 → 사막/위성 배경 위 선명 테두리
- 라벨 폰트 크기 ~1.2배 상향

이란 데이터 이관:
- meEnergyHazardFacilities.ts: 중동 에너지/위험시설 84개
- sampleData: 나탄즈-디모나 핵시설 교차공격 이벤트 (D+20)
- fishing-zones 좌표 보정, types overseasUK→overseasIsrael, vite.config /ollama 프록시

기타:
- AiChatPanel: AI 해양분석 챗 UI (API URL placeholder)
- EventLog에 AiChatPanel 연동 (한국 탭)
- IranDashboard LayerPanel 카운트 전수 보정 + OverseasTreeNode 3단계 트리

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 14:48:58 +09:00

121 lines
3.7 KiB
TypeScript

import { defineConfig, type UserConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
// https://vite.dev/config/
export default defineConfig(({ mode }): UserConfig => ({
plugins: [tailwindcss(), react()],
esbuild: mode === 'production' ? { drop: ['console', 'debugger'] } : {},
server: {
proxy: {
'/api/ais': {
target: 'https://aisapi.maritime.spglobal.com',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/ais/, ''),
secure: true,
},
'/api/rss': {
target: 'https://news.google.com',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/rss/, ''),
secure: true,
},
'/api/gdelt': {
target: 'https://api.gdeltproject.org',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/gdelt/, ''),
secure: true,
},
'/api/nitter1': {
target: 'https://xcancel.com',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/nitter1/, ''),
secure: true,
},
'/api/nitter2': {
target: 'https://nitter.privacydev.net',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/nitter2/, ''),
secure: true,
},
'/api/nitter3': {
target: 'https://nitter.poast.org',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/nitter3/, ''),
secure: true,
},
'/api/rsshub': {
target: 'https://rsshub.app',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/rsshub/, ''),
secure: true,
},
'/api/overpass': {
target: 'https://overpass-api.de',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/overpass/, ''),
secure: true,
},
'/api/khoa-hls': {
target: 'https://www.khoa.go.kr',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/khoa-hls/, ''),
secure: true,
},
'/api/kbs-hls': {
target: 'https://kbsapi.loomex.net',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/kbs-hls/, ''),
secure: true,
},
'/api/twsyndication': {
target: 'https://syndication.twitter.com',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/twsyndication/, ''),
secure: true,
},
'/api/publish-twitter': {
target: 'https://publish.twitter.com',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/publish-twitter/, ''),
secure: true,
},
'/api/celestrak': {
target: 'https://celestrak.org',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/celestrak/, ''),
secure: true,
headers: {
'User-Agent': 'Mozilla/5.0 (compatible; KCG-Monitor/1.0)',
},
},
'/api/kcg/cctv': {
target: 'http://localhost:8080',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/kcg/, '/api'),
},
'/api/kcg': {
target: 'https://kcg.gc-si.dev',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/kcg/, '/api'),
secure: true,
},
'/signal-batch': {
target: 'https://wing.gc-si.dev',
changeOrigin: true,
secure: false,
},
'/shipimg': {
target: 'https://wing.gc-si.dev',
changeOrigin: true,
secure: false,
},
'/ollama': {
target: 'http://localhost:11434',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/ollama/, ''),
},
},
},
}))