From ca13436fb4f072fc576e4ae3fca01f02783d8b49 Mon Sep 17 00:00:00 2001 From: adueck Date: Sat, 17 Aug 2024 22:49:21 -0400 Subject: [PATCH] include fonts in service worker --- website/src/service-worker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/service-worker.ts b/website/src/service-worker.ts index 873a04f..a0eb052 100644 --- a/website/src/service-worker.ts +++ b/website/src/service-worker.ts @@ -58,7 +58,7 @@ registerRoute( registerRoute( // Add in any other file extensions or routing criteria as needed. ({ 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. new StaleWhileRevalidate({ cacheName: "images",