DieselDepot-APP/public/sw.js
SJCoetz def597c157 chore: add generated build artifacts and node module type files
add all Next.js build outputs and third-party dependency type declaration files
2026-07-20 01:18:42 +02:00

17 lines
534 B
JavaScript

// Minimal service worker — registers for PWA installability.
// No offline cache for v1; the app requires network. We just handle
// update prompts and skipWaiting on new versions.
self.addEventListener('install', (event) => {
self.skipWaiting();
});
self.addEventListener('activate', (event) => {
event.waitUntil(self.clients.claim());
});
// Pass-through fetch — no caching. This keeps data fresh; v2 will add
// a stale-while-revalidate layer for static assets.
self.addEventListener('fetch', () => {
/* no-op */
});