import { defineConfig, loadEnv } from 'vite' import vue from '@vitejs/plugin-vue' export default defineConfig(({ mode }) => { const env = loadEnv(mode, process.cwd()) const apiBaseUrl = env.VITE_API_BASE_URL || '/api' const apiProxyTarget = env.VITE_API_PROXY_TARGET || 'http://localhost:9028' return { plugins: [vue()], server: { port: 5173, proxy: { [apiBaseUrl]: { target: apiProxyTarget, changeOrigin: true } } } } })