include fonts in service worker
This commit is contained in:
parent
962a4c1faf
commit
ca13436fb4
|
@ -58,7 +58,7 @@ registerRoute(
|
||||||
registerRoute(
|
registerRoute(
|
||||||
// Add in any other file extensions or routing criteria as needed.
|
// Add in any other file extensions or routing criteria as needed.
|
||||||
({ url }) =>
|
({ url }) =>
|
||||||
url.origin === self.location.origin && url.pathname.endsWith(".png"),
|
url.origin === self.location.origin && ([".png", ".woff2", "woff"].some(ending => url.pathname.endsWith(ending)))
|
||||||
// Customize this strategy as needed, e.g., by changing to CacheFirst.
|
// Customize this strategy as needed, e.g., by changing to CacheFirst.
|
||||||
new StaleWhileRevalidate({
|
new StaleWhileRevalidate({
|
||||||
cacheName: "images",
|
cacheName: "images",
|
||||||
|
|
Loading…
Reference in New Issue