|
@@ -4,6 +4,7 @@ const CompressionPlugin = require('compression-webpack-plugin')
|
|
|
function resolve(dir) {
|
|
|
return path.join(__dirname, dir)
|
|
|
}
|
|
|
+const port = process.env.port || process.env.npm_config_port || 80 // 端口
|
|
|
|
|
|
// vue.config.js
|
|
|
module.exports = {
|
|
@@ -48,14 +49,19 @@ module.exports = {
|
|
|
},
|
|
|
|
|
|
devServer: {
|
|
|
- port: 80,
|
|
|
+ host: '0.0.0.0',
|
|
|
+ port: port,
|
|
|
+ open: true,
|
|
|
proxy: {
|
|
|
- '/jshERP-boot': {
|
|
|
- target: 'http://localhost:8080', // 请求本地 需要jshERP-boot后台项目
|
|
|
- ws: false,
|
|
|
+ [process.env.VUE_APP_BASE_API]: {
|
|
|
+ target: 'http://120.26.144.244:8082', // 请求本地 需要jshERP-boot后台项目
|
|
|
changeOrigin: true,
|
|
|
+ pathRewrite: {
|
|
|
+ ['^' + process.env.VUE_APP_BASE_API]: '',
|
|
|
+ },
|
|
|
},
|
|
|
},
|
|
|
+ disableHostCheck: true,
|
|
|
},
|
|
|
- lintOnSave: undefined,
|
|
|
+ lintOnSave: false,
|
|
|
}
|