import react from '@vitejs/plugin-react' import { defineConfig } from 'vite' export default defineConfig({ plugins: [react()], // @stash/ui 是本地 file 依赖(软链),去重 React,避免加载两份运行时 resolve: { dedupe: ['react', 'react-dom'], }, server: { host: '127.0.0.1', port: 5173, strictPort: true, proxy: { '/api': { target: 'http://127.0.0.1:3000', changeOrigin: true, }, }, }, })