578d09ac7c
Erlaubt, den Vite-Dev-Server gegen ein anderes Backend zu proxen (z.B. die Box) ohne Code-Aenderung - genutzt fuer den End-to-End-Browser-Check des Modell-Managers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
19 lines
541 B
TypeScript
19 lines
541 B
TypeScript
import { defineConfig } from "vite"
|
|
import react from "@vitejs/plugin-react"
|
|
import tailwindcss from "@tailwindcss/vite"
|
|
import path from "node:path"
|
|
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss()],
|
|
resolve: {
|
|
alias: { "@": path.resolve(__dirname, "./src") },
|
|
},
|
|
server: {
|
|
proxy: {
|
|
// Dev: /api → FastAPI-Backend (Override via MC_API_TARGET, z.B. die Box)
|
|
"/api": { target: process.env.MC_API_TARGET || "http://127.0.0.1:9000", changeOrigin: true },
|
|
},
|
|
},
|
|
build: { outDir: "dist" },
|
|
})
|