Import assets and add PWA.

This commit is contained in:
Paul
2021-06-18 19:25:33 +01:00
parent 27eeb3acd2
commit e7d1ada13d
59 changed files with 1958 additions and 182 deletions

View File

@@ -2,5 +2,19 @@ import { render } from "preact";
import "./styles/index.scss";
import { App } from "./app";
import { registerSW } from 'virtual:pwa-register'
const updateSW = registerSW({
onNeedRefresh() {
// ! FIXME: temp
updateSW(true);
// show a prompt to user
},
onOfflineReady() {
console.info('Ready to work offline.');
// show a ready to work offline to user
},
})
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
render(<App />, document.getElementById("app")!);