Files
please-pay-me/web/vite.config.ts
T
2026-09-21 04:06:43 +03:00

22 lines
523 B
TypeScript

import { defineConfig, loadEnv } from "vite";
import react from "@vitejs/plugin-react";
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), "");
// Dev: /api → localhost:51291 (как nginx в Docker)
const apiProxyTarget = env.VITE_API_PROXY_TARGET || "http://localhost:51291";
return {
plugins: [react()],
server: {
port: 51290,
proxy: {
"/api": {
target: apiProxyTarget,
changeOrigin: true,
},
},
},
};
});