Files
WealthySmart/frontend/vite.config.ts
Carlos Escalante 17a0c63abe
All checks were successful
Deploy to VPS / test (push) Successful in 1m50s
Deploy to VPS / deploy (push) Successful in 1m37s
Add manual salary entry
2026-07-14 18:25:13 -06:00

33 lines
910 B
TypeScript

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-oxc";
import tailwindcss from "@tailwindcss/vite";
import path from "path";
// Browser requests arrive at Vite, which then proxies them to the backend.
// Locally the backend is published on the host; Docker Compose supplies the
// service hostname instead (see docker-compose.yml).
const backendUrl = process.env.BACKEND_URL ?? "http://localhost:8001";
export default defineConfig({
plugins: [react(), tailwindcss()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
server: {
proxy: {
// CopilotKit runtime (Hono server, dev only)
"/api/copilotkit": {
target: "http://localhost:3001",
changeOrigin: true,
},
// All other API calls → Python backend
"/api": {
target: backendUrl,
changeOrigin: true,
},
},
},
});