From 1463773480cd687469f1e1e07d2d327181c3ef7d Mon Sep 17 00:00:00 2001 From: Ben Grant Date: Sat, 20 Aug 2022 20:35:58 +1000 Subject: [PATCH] Move clean fn --- crabfit-frontend/public/sw.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crabfit-frontend/public/sw.js b/crabfit-frontend/public/sw.js index afbc900..6d547b2 100644 --- a/crabfit-frontend/public/sw.js +++ b/crabfit-frontend/public/sw.js @@ -8,11 +8,12 @@ import { StaleWhileRevalidate, NetworkFirst } from 'workbox-strategies' skipWaiting() clientsClaim() -cleanupOutdatedCaches() // Injection point precacheAndRoute(self.__WB_MANIFEST) +cleanupOutdatedCaches() + const fileExtensionRegexp = new RegExp('/[^/?]+\\.[^/]+$') registerRoute( // Return false to exempt requests from being fulfilled by index.html.