kcg-monitoring/frontend/vite.config.ts
Nan Kyung Lee e9ce6ecdd2 feat(korea): 한국 현황 레이어 대규모 확장 — 국적 필터, 풍력단지, 항구, 군사시설, 정부기관, 미사일 낙하
- 국적 분류 필터 추가 (한국/중국/북한/일본/미분류)
- S&P Global / MarineTraffic 탭 디자인 개선
- CCTV 백엔드 프록시 연결 (CctvProxyController)
- 풍력단지 레이어 (8개소 해상풍력)
- 항구 레이어 (한국/중국/일본/북한/대만 46개)
- 공항 확장 (중국 20, 일본 18, 북한 5, 대만 9개 추가)
- 군사시설 레이어 (중국/일본/북한/대만 38개소)
- 정부기관 레이어 (중국/일본 32개소)
- 북한 발사/포병진지 레이어 (19개소)
- 북한 미사일 낙하 시각화 (2026년 4건, 궤적 라인, 인근 선박 감지)
- 항행정보/팝업 공통 스타일 정리
- 선박 현황 정렬 스타일 개선
- 레이어 패널 폰트 축소

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 10:34:16 +09:00

116 lines
3.5 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,
},
},
},
}))