Spaces:
Running
Running
import { defineConfig } from 'vite' | |
import react from '@vitejs/plugin-react' | |
import tailwindcss from '@tailwindcss/vite' | |
// https://vite.dev/config/ | |
export default defineConfig({ | |
plugins: [react(), tailwindcss()], | |
server: { | |
proxy: { | |
'/api': { | |
target: 'http://0.0.0.0:7860', | |
changeOrigin: true, | |
secure: false, | |
}, | |
}, | |
}, | |
// For production builds (like HF Spaces), the proxy won't be used | |
// The frontend will make requests directly to /api endpoints | |
}) | |