-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
43 lines (40 loc) · 1.09 KB
/
vue.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
const webpack = require('webpack')//作用:配置jq,网上copy固定写法
const envir = process.env.VUE_APP_TITLE
module.exports = {
publicPath: envir == 'online' ? '/' : './',
outputDir: envir == 'online' ? 'onlineui' : 'testui', //build输出目录
assetsDir: 'assets', //静态资源目录(js, css, img)
lintOnSave: false, //是否开启eslint
productionSourceMap: envir == 'online' ? false : true,
devServer: {
open: true, //是否自动弹出浏览器页面
host: "0.0.0.0",
port: '8080',
https: false,
hotOnly: false,
disableHostCheck: true,
proxy: {
'/api': {
target: "http://172.18.88.11",
// target: "http://172.18.88.108",
changeOrigin: true,
pathRewrite: {
'^/api': ''
},
cookiePathRewrite: {
'/': '/api'
},
// logLevel:'debug'
},
},
},
configureWebpack: {//作用:配置jq,网上copy固定写法
plugins: [
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery",
"windows.jQuery": "jquery"
})
]
}
}