Skip to content

Commit

Permalink
Fix service worker
Browse files Browse the repository at this point in the history
  • Loading branch information
BowenYin committed Sep 8, 2020
1 parent 60fd45a commit fde49cc
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,20 @@ module.exports = {
msTileColor: "#005841",
appleMobileWebAppCapable: "yes",
workboxOptions: {
cleanupOutdatedCaches: true,
clientsClaim: true,
exclude: [/_redirects/],
navigateFallback: "/index.html",
navigateFallbackBlacklist: [/api/, /docs/, /admin/, /submitevent/],
offlineGoogleAnalytics: true,
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",
Expand Down

0 comments on commit fde49cc

Please sign in to comment.