PWA optimization: vite-plugin-pwa, split misc.json, IndexedDB cache layer
This commit is contained in:
1 parent
c342a5b636
commit
8b27bd4767
70 files changed
+5612
-57852
No files matched your search
+1
-4
@@ -44,10 +44,7 @@ export class App {
|
||||
document.addEventListener('click', closeOpenDropdowns);
|
||||
document.addEventListener('touchstart', closeOpenDropdowns, { passive: true });
|
||||
|
||||
// Register service worker for PWA install
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.register('/sw.js').catch(() => {});
|
||||
}
|
||||
// PWA install prompt
|
||||
window.addEventListener('beforeinstallprompt', (e) => {
|
||||
e.preventDefault();
|
||||
(window as any).__deferredPrompt = e;
|
||||
|
||||
Reference in new issue
Block a user