forked from holtwick/peer2school
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
39 lines (29 loc) · 811 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
38
39
// Copyright (c) 2018. Dirk Holtwick <holtwick.de>
const isProduction = process.env.NODE_ENV === 'production'
let config = {
productionSourceMap: false,
}
if (isProduction) {
// Path on GitHub Pages
config.publicPath = `/peer2school/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: true,
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Credentials': 'true',
},
}
}
module.exports = config