25 lines
712 B
TypeScript
25 lines
712 B
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
|
|
// Vignette web — Vite + React 19.
|
|
// 개발 시 /api, /auth 프록시로 FastAPI(8000) 백엔드에 붙는다.
|
|
// 쿠키 인증(__Host-vignette_sid)을 위해 changeOrigin + 쿠키 전달.
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
"/api": {
|
|
target: "http://127.0.0.1:8000",
|
|
changeOrigin: true,
|
|
ws: true,
|
|
// 백엔드 라우트는 /auth, /sessions, /health 로 노출되므로 /api 프리픽스 제거.
|
|
rewrite: (path) => path.replace(/^\/api/, ""),
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
outDir: "dist",
|
|
sourcemap: false,
|
|
},
|
|
});
|