Files
svg-frontend/vite.config.ts
2026-03-19 13:42:23 +03:00

23 lines
541 B
TypeScript

import { defineConfig, loadEnv } from "vite";
import react from "@vitejs/plugin-react";
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), "");
return {
plugins: [react()],
server: {
host: "0.0.0.0",
port: Number(env.VITE_FRONTEND_PORT || 28080),
proxy: {
"/api-proxy": {
target: env.VITE_API_PROXY_TARGET,
changeOrigin: true,
secure: false,
rewrite: (path) => path.replace(/^\/api-proxy/, "")
}
}
}
};
});