improve service-worker

This commit is contained in:
2026-02-01 14:29:54 +01:00
parent 2e51ea37cc
commit afe111ea48

View File

@@ -1,4 +1,4 @@
const CACHE_NAME = 'dgray-v26'; const CACHE_NAME = 'dgray-v27';
const STATIC_ASSETS = [ const STATIC_ASSETS = [
'/', '/',
'/index.html', '/index.html',
@@ -9,12 +9,10 @@ const STATIC_ASSETS = [
'/js/app.js', '/js/app.js',
'/js/router.js', '/js/router.js',
'/js/i18n.js', '/js/i18n.js',
'/js/services/api.js',
'/js/services/crypto.js', '/js/services/crypto.js',
'/js/services/chat.js', '/js/services/chat.js',
'/js/services/directus.js', '/js/services/directus.js',
'/js/services/auth.js', '/js/services/auth.js',
'/js/data/mock-listings.js',
'/js/components/chat-widget.js', '/js/components/chat-widget.js',
'/js/components/listing-card.js', '/js/components/listing-card.js',
'/js/components/search-box.js', '/js/components/search-box.js',
@@ -34,7 +32,6 @@ self.addEventListener('install', (event) => {
event.waitUntil( event.waitUntil(
caches.open(CACHE_NAME) caches.open(CACHE_NAME)
.then((cache) => cache.addAll(STATIC_ASSETS)) .then((cache) => cache.addAll(STATIC_ASSETS))
.then(() => self.skipWaiting())
); );
}); });