-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathvue.config.js
37 lines (37 loc) · 1010 Bytes
/
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 path = require('path')
function resolve (dir) {
return path.join(__dirname, dir)
}
module.exports = {
pages: {
index: {
entry: 'src/main.js',
template: 'public/index.html',
filename: 'index.html',
title: 'Index Page',
},
print: {
entry: 'src/print/main.js',
template: 'public/print.html',
filename: 'print.html',
title: 'print Page',
}
},
chainWebpack: config => {
config.resolve.alias
.set('@', resolve('src'))
.set('assets',resolve('src/assets'))
.set('components',resolve('src/components'));
},
configureWebpack: {
devServer: {
historyApiFallback: {
verbose: true,
rewrites: [
{ from: /^\/index\/.*$/, to: '/index.html'},
{from: /^\/print\/.*$/, to: '/print.html'}
]
}
}
}
}