Closed samwillis closed 1 month ago
This adds additional options for the wasmModule and fsBundle, along with caching of the default ones if used.
This should enable a route to running in a Cloudflare worker (pending further changes) as you can do something like:
import { PGlite } from '@electric-sql/pglite'; import wasm from '@electric-sql/pglite/dist/postgres.wasm'; import fsBundle from '@electric-sql/pglite/dist/postgres.wasm'; pg = await PGlite.create({ wasmModule: wasm, fsBundle: fsBinary, });
We had something working similar to this in the old v0.1.n version of PGlite on Cloudflare
Fixes: #329 #81
Built bundles:
🚀 Deployed on https://66f30841814dd9060fe0066b--pglite.netlify.app
This adds additional options for the wasmModule and fsBundle, along with caching of the default ones if used.
This should enable a route to running in a Cloudflare worker (pending further changes) as you can do something like:
We had something working similar to this in the old v0.1.n version of PGlite on Cloudflare
Fixes: #329 #81