Adding font and lone external image to the service worker cache

This commit is contained in:
Jeff Avallone 2018-02-24 16:43:08 -05:00
parent 692b9fa2df
commit e5e6f1d0c8

View File

@ -16,7 +16,21 @@ module.exports = [
}),
new WorkboxPlugin({
clientsClaim: true,
skipWaiting: true
skipWaiting: true,
runtimeCaching: [
{
urlPattern: new RegExp('https://licensebuttons.net'),
handler: 'staleWhileRevalidate'
},
{
urlPattern: new RegExp('http://fonts.googleapis.com'),
handler: 'staleWhileRevalidate'
},
{
urlPattern: new RegExp('http://fonts.gstatic.com'),
handler: 'staleWhileRevalidate'
}
]
})
]
}),