add the other pieces for the previous commit

This commit is contained in:
2025-05-25 01:18:58 -06:00
parent 3650b55e81
commit 5ae3eca773
4 changed files with 42 additions and 0 deletions

View File

@@ -1,5 +1,19 @@
import { initBackend } from 'absurd-sql/dist/indexeddb-main-thread';
import { initializeApp } from "./main.common";
import "./registerServiceWorker"; // Web PWA support
const app = initializeApp();
function sqlInit() {
// see https://github.com/jlongster/absurd-sql
let worker = new Worker(new URL('./registerSQLWorker.js', import.meta.url), {
type: 'module'
});
// This is only required because Safari doesn't support nested
// workers. This installs a handler that will proxy creating web
// workers through the main thread
initBackend(worker);
}
sqlInit();
app.mount("#app");