31 lines
803 B
TypeScript
31 lines
803 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import { fileURLToPath } from 'url'
|
|
import { dirname, resolve } from 'path'
|
|
|
|
const __filename = fileURLToPath(import.meta.url)
|
|
const __dirname = dirname(__filename)
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
server: {
|
|
host: '0.0.0.0', // Docker 등의 환경에서 외부 접속 허용
|
|
port: 3000,
|
|
proxy: {
|
|
'/api': {
|
|
target: process.env.VITE_API_TARGET || 'http://localhost:8090',
|
|
changeOrigin: true,
|
|
},
|
|
'/ws': {
|
|
target: 'ws://localhost:8090',
|
|
ws: true,
|
|
},
|
|
},
|
|
},
|
|
})
|