forked from holtwick/peer2school
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
51 lines (41 loc) · 1.07 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
// Copyright (c) 2018. Dirk Holtwick <holtwick.de>
const isProduction = process.env.NODE_ENV === 'production'
let config = {
productionSourceMap: false,
pages: {
index: {
entry: 'src/main.js',
template: `public/index.html`,
filename: 'index.html',
},
jitsi: {
entry: 'src/jitsi/main.js',
template: `public/jitsi.html`,
filename: 'jitsi.html',
}
},
}
if (isProduction) {
// Path on GitHub Pages
config.publicPath = `/dist`
// Don't load workbox stuff from third party site
config.pwa = {
workboxOptions: {
importWorkboxFrom: 'local',
exclude: [/\.htaccess/],
skipWaiting: true,
},
}
} else {
config.devServer = {
// Allow debugging from multiple devices in the local network
disableHostCheck: true,
// Some API (like WebRTC getUserMedia) is only allowed in secure context
https: (process.env.HTTPS_OFF || '').toString() !== '1',
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Credentials': 'true',
},
}
}
module.exports = config