import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' // Application base path configuration from environment variables // Set VITE_BASE_PATH in .env files to configure the deployment path const BASE_PATH = process.env.VITE_BASE_PATH || '/' export default defineConfig({ plugins: [react()], base: BASE_PATH, // Used for asset paths and routing server: { port: 3000, proxy: { '/api': { target: 'http://localhost:3001', changeOrigin: true } } }, build: { outDir: 'dist', sourcemap: true } })