-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
31 lines (31 loc) · 1.03 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
const path = require('path');
function resolve (dir) {
return path.join(__dirname, dir)
}
module.exports = {
runtimeCompiler : true,
lintOnSave: true,
publicPath: './',
chainWebpack: (config)=>{
config.resolve.alias
.set('@', resolve('./src'))
.set('components',resolve('./src/components'))
.set('views',resolve('./src/views'))
.set('assets',resolve('./src/assets'))
.set('network',resolve('./src/network'))
.set('video',resolve('./public/video'))
.set('image',resolve('./public/image'))
},
devServer: {
proxy: {
'/api': { //将www.example.com映射为/apis
target: 'http://www.bjtongyilingxiu.com:8080', // 接口域名
secure: false, // 如果是https接口,需要配置这个参数
changeOrigin: true, //是否跨域
pathRewrite: {
'^/api': '' //需要rewrite的,
}
}
}
},
}