import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' // Proxy /api/* to the demo.flow-master.ai backend during dev so live-mode // fetches don't hit CORS. In production, the build is deployed under the // same origin as the backend, so no proxy is needed. const TARGET = process.env.VITE_FM_BASE || 'https://demo.flow-master.ai' export default defineConfig({ plugins: [react()], server: { proxy: { '/api': { target: TARGET, changeOrigin: true, secure: true, }, }, }, })