Skip to content

Commit 19b94a9

Browse files
committed
added cleanupOutdatedCaches for the cleanup of old files
1 parent 3005e56 commit 19b94a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/service-worker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { precacheAndRoute } from 'workbox-precaching'
1+
import { precacheAndRoute, cleanupOutdatedCaches } from 'workbox-precaching'
22
import { NavigationRoute, registerRoute, Route } from 'workbox-routing'
33
import * as navigationPreload from 'workbox-navigation-preload'
44
import { NetworkFirst, StaleWhileRevalidate } from 'workbox-strategies'
@@ -19,7 +19,7 @@ clientsClaim()
1919
precacheAndRoute(self.__WB_MANIFEST)
2020

2121
// clean old assets
22-
// cleanupOutdatedCaches()
22+
cleanupOutdatedCaches()
2323

2424
// Enable navigation preload
2525
navigationPreload.enable()

0 commit comments

Comments
 (0)