32 lines
745 B
JavaScript
32 lines
745 B
JavaScript
|
|
import { defineConfig } from "vite";
|
||
|
|
import react from "@vitejs/plugin-react";
|
||
|
|
import path from "path";
|
||
|
|
|
||
|
|
// https://vitejs.dev/config/
|
||
|
|
export default defineConfig({
|
||
|
|
plugins: [react()],
|
||
|
|
resolve: {
|
||
|
|
alias: {
|
||
|
|
"@": path.resolve(__dirname, "./src"),
|
||
|
|
},
|
||
|
|
},
|
||
|
|
server: {
|
||
|
|
host: "0.0.0.0",
|
||
|
|
port: 80,
|
||
|
|
strictPort: true,
|
||
|
|
allowedHosts: ["minecraft.caadiq.co.kr", "status.caadiq.co.kr"],
|
||
|
|
// 백엔드 API 프록시 설정 (같은 컨테이너 내 server.js가 3000 포트 사용)
|
||
|
|
proxy: {
|
||
|
|
"/api": {
|
||
|
|
target: "http://127.0.0.1:3000",
|
||
|
|
changeOrigin: true,
|
||
|
|
},
|
||
|
|
"/socket.io": {
|
||
|
|
target: "http://127.0.0.1:3000",
|
||
|
|
ws: true,
|
||
|
|
changeOrigin: true,
|
||
|
|
},
|
||
|
|
},
|
||
|
|
},
|
||
|
|
});
|