-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathvue.config.js
62 lines (62 loc) · 1.93 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
const path = require('path');
const appTitle = "流程审批系统";
const pagesDir = "src/pages";
const resolve = function (dir) {
return path.join(__dirname, dir)
}
module.exports = {
publicPath: process.env.NODE_ENV === 'production' ?
'/approvalflow/' : '/',
productionSourceMap: false,
devServer: {
//Config proxy
proxy: {
'/api': {
target: 'http://xwbg.sslxzc.cn',
changeOrigin: true
},
'/localApi': {
target: 'http://127.0.0.1:3000',
pathRewrite: {
'^/localApi': ''
},
changeOrigin: true
}
}
},
//多页面配置
pages: {
index: {
entry: `${pagesDir}/index/main.js`,
template: `public/index.html`,
filename: 'index.html',
title: appTitle,
chunks: ['chunk-vendors', 'chunk-common', 'index']
},
web: {
entry: `${pagesDir}/web/main.js`,
template: `public/index.html`,
filename: 'web.html',
title: appTitle,
chunks: ['chunk-vendors', 'chunk-common', 'web']
},
app: {
entry: `${pagesDir}/app/main.js`,
template: `public/index.html`,
filename: 'app.html',
title: appTitle,
chunks: ['chunk-vendors', 'chunk-common', 'app']
}
},
chainWebpack: (config) => {
config.resolve.alias
.set('@', resolve('src'))
.set('components', resolve('src/components'))
.set('libs', resolve('src/libs'))
.set('store', resolve('src/store'))
.set('mixins', resolve('src/mixins'))
.set('utils', resolve('src/utils'))
.set('formDesign', resolve('src/components/FormDesign'))
.set('FormRender', resolve('src/components/FormRender'));
}
};