Testversion: Datenbankabbild als .wasm ausliefern
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AmyPfuNc4sCRfaF3oURXZz
This commit is contained in:
@@ -24,7 +24,8 @@ async function pglite(): Promise<PGlite> {
|
||||
const [wasm, initdb, daten] = await Promise.all([
|
||||
modul("pglite.wasm"),
|
||||
modul("initdb.wasm"),
|
||||
fetch(adresse("pglite.data")).then((r) => { if (!r.ok) throw new Error(`pglite.data: ${r.status}`); return r.blob(); }),
|
||||
// Dateisystem-Abbild von Postgres (pglite.data, beim Bauen umbenannt)
|
||||
fetch(adresse("pglite-data.wasm")).then((r) => { if (!r.ok) throw new Error(`pglite-data.wasm: ${r.status}`); return r.blob(); }),
|
||||
]);
|
||||
return PGlite.create({ pgliteWasmModule: wasm, initdbWasmModule: initdb, fsBundle: daten, parsers: PARSER } as ConstructorParameters<typeof PGlite>[1] & object);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user