feat: add module generator feature with controller, routing, and UI integration

This commit is contained in:
Ümit Tunç
2026-04-28 23:38:35 +03:00
parent 7a5af8e911
commit afc047b0bb
5 changed files with 292 additions and 3 deletions
+13 -3
View File
@@ -1,11 +1,21 @@
self.addEventListener('install', (event) => {
event.waitUntil(
caches.open('app-cache').then((cache) => {
return cache.addAll([
'/',
// Use a more robust approach: attempt to cache but don't fail the whole installation if one fails
const urlsToCache = [
'/assets/manifest.json',
'/assets/favicon.png'
]);
];
return Promise.all(
urlsToCache.map(url => {
return fetch(url).then(response => {
if (response.ok) {
return cache.put(url, response);
}
}).catch(err => console.warn('SW: Failed to cache ' + url, err));
})
);
})
);
});