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