| import { defineConfig } from 'vite' | |
| import react from '@vitejs/plugin-react' | |
| // https://vite.dev/config/ | |
| export default defineConfig({ | |
| plugins: [react()], | |
| server: { | |
| proxy: { | |
| // When VITE_API_BASE_URL is not set, proxy /api/* to the local Docker backend | |
| '/api': { | |
| target: 'http://localhost:7860', | |
| changeOrigin: true, | |
| rewrite: (path) => path.replace(/^\/api/, ''), | |
| }, | |
| }, | |
| }, | |
| }) | |