feat: Add PWA support with service worker and caching

- Implemented service worker registration in main.js
- Added icons for PWA in manifest.json
- Created a basic service worker (sw.js) for caching static assets
- Generated a list of files to cache using a Node.js script (generate-pwa-cache-list.js)
- Added icon images (icon-192.png and icon-512.png) for PWA
- Defined PWA manifest with app details and icon references
This commit is contained in:
sHa
2025-06-11 22:36:48 +03:00
parent 1c0d303adc
commit 0650c40199
13 changed files with 175 additions and 14 deletions

View File

@@ -1,3 +1,9 @@
import App from './App.svelte';
new App({ target: document.getElementById('app') });
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/sw.js');
});
}