module.exports = {
devServer: {
port: 8888, // 端口号
open: true, // 启动服务自动开启浏览器
https: false, // 协议
host: "localhost", // 主机名
proxy: { //设置 dev-api去代理服务区请求转发
"/dev-apis": {
target: "http://localhost:8081",
cahngeOrigin: true, // 开启代理服务进行请求转发
pathRewrite: {
"^/dev-apis": "" // 重新路径
}
}
}
},
lintOnSave: false, // 保存时检验格式
outputDir: "dist2", // 打包路径修改
assetsDir: "assets", // 静态文件名
indexPath: "out/index.html", // 指定index.html的输出路径
productionSourceMap: false, // 打包不生产.map文件 加快打包构建
}
vue.config.js自定义配置
于 2022-04-02 15:46:59 首次发布