File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import {
26
26
import { URLS } from './config'
27
27
import Hotjar from './components/Hotjar/Hotjar'
28
28
import { validateToken } from './services/service'
29
+ import { cleanupOutdatedCaches } from 'workbox-precaching'
29
30
30
31
const NavigationRoutes = lazy ( ( ) => import ( './components/common/navigation/NavigationRoutes' ) )
31
32
const Login = lazy ( ( ) => import ( './components/login/Login' ) )
@@ -135,6 +136,7 @@ export default function App() {
135
136
if ( refreshing . current ) {
136
137
return
137
138
}
139
+ cleanupOutdatedCaches ( )
138
140
if ( document . visibilityState === 'visible' ) {
139
141
window . location . reload ( )
140
142
refreshing . current = true
Original file line number Diff line number Diff line change 4
4
// import { NetworkFirst, StaleWhileRevalidate } from 'workbox-strategies'
5
5
// import { clientsClaim } from 'workbox-core'
6
6
7
- import { cleanupOutdatedCaches , createHandlerBoundToURL , precacheAndRoute } from 'workbox-precaching'
7
+ import { createHandlerBoundToURL , precacheAndRoute } from 'workbox-precaching'
8
8
import { NavigationRoute , registerRoute } from 'workbox-routing'
9
9
import { clientsClaim } from 'workbox-core'
10
10
@@ -21,7 +21,7 @@ self.addEventListener('message', (event) => {
21
21
precacheAndRoute ( self . __WB_MANIFEST )
22
22
23
23
// clean old assets
24
- cleanupOutdatedCaches ( )
24
+ // cleanupOutdatedCaches()
25
25
26
26
// to allow work offline
27
27
registerRoute ( new NavigationRoute ( createHandlerBoundToURL ( 'index.html' ) ) )
You can’t perform that action at this time.
0 commit comments