-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
37 lines (36 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
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true,
lintOnSave:false,devServer: {
proxy: {
'/baidu': {
target: ' https://api.1314.cool', // 设置代理目标
changeOrigin: true, // 是否改变请求源
pathRewrite: {
'^/baidu': '' // 重写路径,将请求路径中的 '/api' 替换为空
}
},
'/webo': {
target: 'https://weibo.com', // 设置代理目标
changeOrigin: true, // 是否改变请求源
pathRewrite: {
'^/webo': '' // 重写路径,将请求路径中的 '/api' 替换为空
}
},
'/mock': {
target: 'http://1.12.243.231:8082/', // 设置代理目标
changeOrigin: true, // 是否改变请求源
pathRewrite: {
'^/mock': '/api' // 重写路径,将请求路径中的 '/api' 替换为/api
}
},
}
},
// lintOnSave : false,
// publicPath: '/',
// //只有Https才能使用录音
// devServer : {
// https : false,
// port : 9004
// }
})