Files
manage/frontend/vite.config.ts
T
2026-05-04 13:50:53 +02:00

24 lines
474 B
TypeScript

import { defineConfig, loadEnv } from "vite";
import react from "@vitejs/plugin-react";
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), "");
const proxyTarget =
process.env.VITE_DEV_API_PROXY_TARGET ||
env.VITE_DEV_API_PROXY_TARGET ||
"http://localhost:8000";
return {
plugins: [react()],
server: {
proxy: {
"/api": {
target: proxyTarget,
changeOrigin: true,
secure: false,
},
},
},
};
});