-
Notifications
You must be signed in to change notification settings - Fork 12
/
vue.config.js
62 lines (61 loc) · 1.67 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
process.env.VUE_APP_VERSION = require("./package.json").version;
module.exports = {
devServer: {
disableHostCheck: true,
},
productionSourceMap: true,
transpileDependencies: [],
css: {
loaderOptions: {
sass: {
data: `@import "~@/sass/main.scss"`
}
}
},
pwa: {
name: "Harker Bell Schedule",
themeColor: "#FFFFFF",
msTileColor: "#005841",
appleMobileWebAppCapable: "yes",
workboxOptions: {
cleanupOutdatedCaches: true,
clientsClaim: true,
exclude: [/_redirects/],
navigateFallback: "/index.html",
navigateFallbackBlacklist: [/api/, /docs/, /admin/, /submitevent/, /p/],
offlineGoogleAnalytics: {
parameterOverrides: {
cd14: "offline",
},
hitFilter: params => {
const queueTime = Math.round(params.get("qt")/1000);
params.set("cm3", queueTime);
},
},
runtimeCaching: [{
urlPattern: /^https:\/\/fonts\.googleapis\.com/,
handler: "staleWhileRevalidate",
}, {
urlPattern: /^https:\/\/fonts\.gstatic\.com/,
handler: "cacheFirst",
options: {
cacheName: "google-fonts-files",
expiration: {
maxAgeSeconds: 60*60*24*365,
maxEntries: 30
}
}
}, {
urlPattern: "https://www.google-analytics.com/analytics.js",
handler: "staleWhileRevalidate"
}, {
urlPattern: "https://ipmeta.io/plugin.js",
handler: "staleWhileRevalidate"
}, {
urlPattern: "https://qbw8rkkv7x0h.statuspage.io/embed/script.js",
handler: "staleWhileRevalidate"
}],
skipWaiting: true,
},
},
};