| |
| import { defineConfig } from "vite"; |
| import react from "@vitejs/plugin-react"; |
|
|
| |
| |
| |
| |
| const backendPort = process.env.GITPILOT_PORT || "8000"; |
| const backendUrl = process.env.GITPILOT_BACKEND_URL || `http://localhost:${backendPort}`; |
|
|
| export default defineConfig({ |
| plugins: [react()], |
| define: { |
| __APP_VERSION__: JSON.stringify(process.env.npm_package_version || "unknown"), |
| }, |
| server: { |
| port: 5173, |
| host: true, |
| |
| |
| proxy: process.env.VERCEL |
| ? undefined |
| : { |
| "/api": backendUrl, |
| "/ws": { |
| target: backendUrl.replace(/^http/, "ws"), |
| ws: true, |
| }, |
| }, |
| }, |
| }); |