module.exports = { publicPath: './', devServer: { proxy: { //配置跨域 '/api': { target: 'http:/IP:端口号', changOrigin: true, //允许跨域 pathRewrite: { '^/api': '' } } } } }