Navigation Menu

Skip to content

Commit

Permalink
Add pwa workbox options to cache google fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgaroro committed Aug 14, 2018
1 parent 62c6e4b commit 70318e9
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions vue.config.js
@@ -0,0 +1,22 @@
const manifestJSON = require('./public/manifest.json')

module.exports = {
pwa: {
themeColor: manifestJSON.theme_color,
workboxOptions: {
runtimeCaching: [{
urlPattern: new RegExp('https://fonts.(?:googleapis|gstatic).com/(.*)'),
handler: 'cacheFirst',
options: {
cacheName: 'google-fonts',
expiration: {
maxEntries: 30
},
cacheableResponse: {
statuses: [0, 200]
}
}
}]
}
}
}

0 comments on commit 70318e9

Please sign in to comment.