|
|
@ -1,8 +1,5 @@ |
|
|
|
"use strict"; |
|
|
|
const path = require("path"); |
|
|
|
const webpack = require("webpack"); |
|
|
|
|
|
|
|
const packageJSON = require("./package.json"); |
|
|
|
|
|
|
|
function resolve(dir) { |
|
|
|
return path.join(__dirname, dir); |
|
|
@ -46,8 +43,8 @@ module.exports = { |
|
|
|
// target: `http://10.168.73.36:8080`, // 周乐
|
|
|
|
// target: `http://10.168.77.209:8080`, // 刘朋
|
|
|
|
// target: `http://10.168.66.196:8080`, //刘文阁
|
|
|
|
// target: `http://10.168.56.206:8087`, //孟
|
|
|
|
target: `http://10.0.81.202:8087`, //现场后台
|
|
|
|
target: `http://10.168.65.156:8087`,//孟
|
|
|
|
// target: `http://10.0.81.202:8087`, //现场后台
|
|
|
|
changeOrigin: true, |
|
|
|
pathRewrite: { |
|
|
|
["^" + process.env.VUE_APP_BASE_API]: "", |
|
|
@ -82,14 +79,6 @@ module.exports = { |
|
|
|
chainWebpack(config) { |
|
|
|
config.plugins.delete("preload"); // TODO: need test
|
|
|
|
config.plugins.delete("prefetch"); // TODO: need test
|
|
|
|
config.plugin("DefinePlugin").use(webpack.DefinePlugin, [ |
|
|
|
{ |
|
|
|
"process.env.Version": (() => |
|
|
|
JSON.stringify( |
|
|
|
`${new Date().toLocaleString()}-V${packageJSON.version}` |
|
|
|
))(), |
|
|
|
}, |
|
|
|
]); |
|
|
|
|
|
|
|
const rootModulesPath = path.resolve("node_modules"); |
|
|
|
if (config.resolve.modules.store.has(rootModulesPath)) { |
|
|
|