import { defineConfig, loadEnv } from 'vite'; import react from '@vitejs/plugin-react'; // https://vite.dev/config/ export default defineConfig(({ mode }) => { const env = loadEnv(mode, process.cwd()); return { base: '/', plugins: [react()], build: { outDir: 'dist', }, server: { port: env.VITE_PORT, proxy: { '/api': { target: env.VITE_API_URL || 'http://81.69.223.133:8008', changeOrigin: true, }, }, historyApiFallback: true, }, }; });