🍎 Makes app installable
This commit is contained in:
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user