-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
37 lines (33 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
32
33
34
35
36
37
const development = {
outputDir: 'dist/',
assetsDir: 'static/vue/vue_mall',
indexPath: 'templates/index.html',
publicPath: '/',
};
module.exports = {
outputDir: 'dist', //build输出目录
assetsDir: 'assets', //静态资源目录(js, css, img)
lintOnSave: true, //是否开启eslint
configureWebpack: {
devtool: 'source-map',
},
devServer: {
open: true, //是否自动弹出浏览器页面
host: "localhost",
port: '8081',
proxy: {
'/jiandan': {
target: 'https://api.jandan.net', //API服务器的地址
pathRewrite: { //重写路径 比如'/api/aaa/ccc'重写为'/aaa/ccc'
'^/jiandan': ''
}
},
'/news_api/': {
target: 'https://i.jandan.net', //API服务器的地址
pathRewrite: { //重写路径 比如'/api/aaa/ccc'重写为'/aaa/ccc'
'^/news_api': ''
}
}
},
}
}