36 lines
926 B
TypeScript
Executable File
36 lines
926 B
TypeScript
Executable File
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import path from 'path'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
port: 5174,
|
|
proxy: {
|
|
// HLS 스트림 프록시 등 상대 경로 API 요청을 백엔드로 전달
|
|
'/api': {
|
|
target: 'http://localhost:3001',
|
|
changeOrigin: true,
|
|
},
|
|
'/daily_ocean': {
|
|
target: 'https://www.khoa.go.kr',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@common': path.resolve(__dirname, 'src/common'),
|
|
'@tabs': path.resolve(__dirname, 'src/tabs'),
|
|
},
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
// deck.gl → @loaders.gl/worker-utils가 Node.js child_process를 참조하나
|
|
// 브라우저에서는 해당 코드 경로를 타지 않으므로 undefined shim 허용
|
|
shimMissingExports: true,
|
|
},
|
|
},
|
|
})
|