Hotfix: SW clean outdated caches

This commit is contained in:
Ben Grant 2022-08-19 18:10:50 +10:00
parent 1bd9a67dcd
commit d8c08a7f60

View file

@ -2,12 +2,13 @@
import { clientsClaim, skipWaiting } from 'workbox-core'
import { ExpirationPlugin } from 'workbox-expiration'
import { precacheAndRoute, createHandlerBoundToURL } from 'workbox-precaching'
import { precacheAndRoute, createHandlerBoundToURL, cleanupOutdatedCaches } from 'workbox-precaching'
import { registerRoute } from 'workbox-routing'
import { StaleWhileRevalidate, NetworkFirst } from 'workbox-strategies'
skipWaiting()
clientsClaim()
cleanupOutdatedCaches()
// Injection point
precacheAndRoute(self.__WB_MANIFEST)