2020-11-01 19:37:30 +08:00
|
|
|
// vue.config.js
|
2021-07-31 18:15:40 +08:00
|
|
|
const IP = 'localhost'
|
2020-11-01 19:37:30 +08:00
|
|
|
module.exports = {
|
|
|
|
// 输出目录
|
2020-11-02 12:00:39 +08:00
|
|
|
outputDir: '../modules/server/src/main/resources/dist',
|
2021-03-02 13:01:54 +08:00
|
|
|
// 控制静态资源使用相对路径
|
|
|
|
publicPath: './',
|
2020-11-02 12:00:39 +08:00
|
|
|
// 代理设置
|
|
|
|
devServer: {
|
2021-02-23 18:49:02 +08:00
|
|
|
port: 3000,
|
2020-12-01 18:42:53 +08:00
|
|
|
proxy: {
|
|
|
|
// websocket
|
|
|
|
'/ssh': {
|
2021-07-31 18:15:40 +08:00
|
|
|
target: `wss://${IP}:2122`,
|
2020-12-01 18:42:53 +08:00
|
|
|
// true/false: if you want to proxy websockets
|
|
|
|
ws: false,
|
2021-02-19 14:35:29 +08:00
|
|
|
secure: false,
|
2020-12-01 18:42:53 +08:00
|
|
|
},
|
2020-12-03 11:56:49 +08:00
|
|
|
'/tomcat_log': {
|
2021-07-31 18:15:40 +08:00
|
|
|
target: `wss://${IP}:2122`,
|
2020-12-03 11:56:49 +08:00
|
|
|
// true/false: if you want to proxy websockets
|
|
|
|
ws: false,
|
2021-02-19 14:35:29 +08:00
|
|
|
secure: false,
|
2020-12-03 11:56:49 +08:00
|
|
|
},
|
2020-12-17 16:43:20 +08:00
|
|
|
'/console': {
|
2021-07-31 18:15:40 +08:00
|
|
|
target: `wss://${IP}:2122`,
|
2020-12-17 16:43:20 +08:00
|
|
|
// true/false: if you want to proxy websockets
|
|
|
|
ws: false,
|
2021-02-19 14:35:29 +08:00
|
|
|
secure: false,
|
2020-12-17 16:43:20 +08:00
|
|
|
},
|
2021-02-24 18:25:08 +08:00
|
|
|
'/script_run': {
|
2021-07-31 18:15:40 +08:00
|
|
|
target: `wss://${IP}:2122`,
|
2021-02-24 18:25:08 +08:00
|
|
|
// true/false: if you want to proxy websockets
|
|
|
|
ws: false,
|
|
|
|
secure: false,
|
|
|
|
},
|
2020-12-01 18:42:53 +08:00
|
|
|
// http
|
|
|
|
'/*': {
|
2021-07-31 18:15:40 +08:00
|
|
|
target: `http://${IP}:2122`,
|
2020-12-19 00:27:28 +08:00
|
|
|
timeout: 10 * 60 * 1000
|
2020-12-01 18:42:53 +08:00
|
|
|
}
|
2021-02-19 14:35:29 +08:00
|
|
|
},
|
2020-11-02 22:29:57 +08:00
|
|
|
},
|
|
|
|
chainWebpack: config => {
|
2021-02-19 14:35:29 +08:00
|
|
|
config.plugin('html')
|
|
|
|
.tap(args => {
|
|
|
|
args[0].title= 'Jpom项目管理系统'
|
2021-03-04 10:59:14 +08:00
|
|
|
args[0].build= new Date().getTime()
|
2021-02-19 14:35:29 +08:00
|
|
|
return args
|
|
|
|
})
|
2020-11-02 12:00:39 +08:00
|
|
|
}
|
2020-11-01 19:37:30 +08:00
|
|
|
}
|