const path = require("path"); //添加版本号 此处用时间戳 const Timestamp = new Date().getTime() process.env.VUE_APP_VERSION = require('./package.json').version module.exports = { publicPath: "./", devServer: { host: "0.0.0.0", port: "", disableHostCheck: true, // 关闭主机头检测 proxy: { "/api334343": { // target: "http://mem.360lj.com/ueapi1", // 目标 API 地址 富勇电脑 target: "http://ue.360lj.com", ws: true, changeOrigin: true, // 是否跨域 pathRewrite: { "^/api": "/api" } }, "/ymall": { target: "http://mem.360lj.com", ws: true, changeOrigin: true, // 是否跨域 pathRewrite: { "^/ymall": "/ymall" } }, "/note": { target: "http://mem.360lj.com", ws: true, changeOrigin: true, // 是否跨域 pathRewrite: { "^/note": "/note" } } }, overlay: { warnings: false, errors: false, lintOnSave: false } }, configureWebpack: { output: { // 输出重构 打包编译后的 文件名称 【模块名称.版本号.时间戳】 filename: `js/[name].${process.env.VUE_APP_Version}.${Timestamp}.js`, chunkFilename: `js/[name].${process.env.VUE_APP_Version}.${Timestamp}.js` } }, };