🍎 Makes app installable

This commit is contained in:
Rune Harlyk
2024-03-17 22:01:54 +01:00
committed by Rune Harlyk
parent 8528f3400f
commit 09f9649d6f
6 changed files with 68 additions and 1 deletions
+6
View File
@@ -2,6 +2,12 @@ import './app.css';
import './index.css';
import App from './App.svelte';
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/sw.js');
});
}
const app = new App({
target: document.getElementById('app') as HTMLElement
});