import react from '@vitejs/plugin-react' import { defineConfig, loadEnv } from 'vite' export default defineConfig(({ mode }) => { const env = loadEnv(mode, process.cwd(), '') return { plugins: [react()], server: { proxy: { '/database-api': { target: env.VITE_DATABASE_API_BASE_URL || 'http://127.0.0.1:9000', changeOrigin: true, rewrite: (path) => path.replace(/^\/database-api/, ''), }, }, }, } })