import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' // use a fixed dev proxy target; frontend will use relative paths in production export default defineConfig(() => { const backend = 'http://localhost:3000' return { plugins: [react()], server: { proxy: { '/api': { target: backend, changeOrigin: true, secure: false, }, '/uploads': { target: backend, changeOrigin: true, secure: false, }, }, }, } })