2021-06-28 10:17:38 +01:00
|
|
|
import { registerSW } from 'virtual:pwa-register';
|
|
|
|
import { internalEmit } from './lib/eventEmitter';
|
|
|
|
|
|
|
|
export const updateSW = registerSW({
|
2021-06-18 19:25:33 +01:00
|
|
|
onNeedRefresh() {
|
2021-06-28 10:17:38 +01:00
|
|
|
internalEmit('PWA', 'update');
|
2021-06-18 19:25:33 +01:00
|
|
|
},
|
|
|
|
onOfflineReady() {
|
|
|
|
console.info('Ready to work offline.');
|
|
|
|
// show a ready to work offline to user
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
2021-06-22 14:22:35 +01:00
|
|
|
import "./styles/index.scss";
|
2021-06-27 21:54:31 +01:00
|
|
|
import { render } from "preact";
|
2021-06-22 14:22:35 +01:00
|
|
|
import { App } from "./pages/app";
|
|
|
|
|
2021-06-18 15:46:30 +01:00
|
|
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
2021-06-18 15:57:08 +01:00
|
|
|
render(<App />, document.getElementById("app")!);
|