import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import { fileURLToPath, URL } from 'node:url' export default defineConfig({ plugins: [vue()], resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) } }, server: { port: 5173, host: true, proxy: { // 使用 /dev-api 前缀,与 RobotSpineWeb 保持一致 '/dev-api': { //target: 'http://192.168.0.30:8080', target: 'http://localhost:8080', changeOrigin: true, rewrite: (path) => path.replace(/^\/dev-api/, '') } } }, build: { outDir: 'dist', assetsDir: 'assets', sourcemap: false, chunkSizeWarningLimit: 1000 } })