// client/vue.config.js const path = require('path'); module.exports = { outputDir: path.resolve(__dirname, 'dist'), publicPath: '/', devServer: { proxy: { '/api': { target: 'http://localhost:9001', // 后端接口地址(开发阶段) changeOrigin: true, // pathRewrite: { '^/api': '/api' }, }, '/static': { target: 'http://localhost:9001', // 后端接口地址(开发阶段) changeOrigin: true, // pathRewrite: { '^/api': '/api' }, } }, }, };