diff --git a/packages/client/public/serviceWorker.js b/packages/client/public/serviceWorker.js index 79489ef..ae4aaec 100644 --- a/packages/client/public/serviceWorker.js +++ b/packages/client/public/serviceWorker.js @@ -4,8 +4,7 @@ const urlsToCache = [ '/', '/manifest.json', '/index.html', - '/favicon.png', - '/main.tsx' + '/favicon.png' ] const networkFirst = async (request) => { @@ -29,18 +28,6 @@ const networkFirst = async (request) => { } } -const update = async (request) => { - const cache = await caches.open(DYNAMIC_CACHE_NAME) - try { - const response = await fetch(request) - if (response && response.status === 200 && response.type === 'basic') { - await cache.put(request, response) - } - } catch (error) { - console.error('Update failed', error) - } -} - self.addEventListener('install', (event) => { event.waitUntil( caches @@ -68,5 +55,4 @@ self.addEventListener('fetch', (event) => { } event.respondWith(networkFirst(request)) - event.waitUntil(update(request)) })