1、先检查项目有没有vue.config.js 2、在根目录创建vue.config.js,加入以下代码 module.exports = { productionSourceMap:false, // 关闭ESLINT校验工具 lintOnSave: false, //配置代理跨域 // devServer: { // proxy: { // "/": { // target: "localhonst:8080", // }, // }, // }, };