Files
SPipe/vite.config.ts
bjkim1 21ebb16fb7 SPipe 데모 v2 (2026-10-30) 서버 배포본
- SPipe_server_2026-10-30.zip 내용을 풀어서 등록 (압축 파일은 올리지 않음)
- README에 데모 v2 서버 업데이트 순서 추가, 저장소에 없는 문서 목차 정리
- 패치내역을 docs/로 이동, _worklog.md 추가
- 임시 파일(backend/temp.*)과 API 키가 든 파일은 제외
2026-10-30 11:00:46 +09:00

28 lines
711 B
TypeScript

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
export default defineConfig({
optimizeDeps: {
exclude: ["epanet-js/engines/v2.3.5"],
},
plugins: [react()],
server: {
host: "127.0.0.1",
port: 5173,
proxy: {
"/api": "http://127.0.0.1:8000",
},
},
// Intranet serving (`npm run serve:lan`): the built app is exposed on all
// interfaces, while the analysis API stays bound to 127.0.0.1 and is reached
// only through this same-origin /api proxy (no CORS, API not exposed).
preview: {
host: "0.0.0.0",
port: 8080,
strictPort: true,
proxy: {
"/api": "http://127.0.0.1:8000",
},
},
});