-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
38 lines (35 loc) · 1.05 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
const path = require('path')
function resolve(url){
return path.resolve(__dirname,url)
}
module.exports = {
// 选项...
baseUrl:"./",
outputDir:"dist",
assetsDir:"assets",
indexPath:"index.html",
// filenameHashing:true,
// pages:undefined,
// lintOnSave:true,
// runtimeCompiler:false,
// transpileDependencies:[],
// productionSourceMap:false,
// crossorigin:undefined,
// integrity:false,
devServer:{//代理
port:8080,//端口号
open:true,//配置自动启动浏览器
proxy:'http://192.168.255.201:8082', // 跨域代理 只代理一个的写法
// proxy:{ //跨域代理 配置多个代理
// '/api':{
// target:'http://',// 需要请求的地址
// changeOrigin:true, // 是否跨域
// ws:true,
// pathRewrite:{
// // 替换target中的请求地址,也就是说,在请求的时候,url用'/proxy'代替'http://ip.taobao.com'
// '^/api':'/'
// }
// }
// }
},
}