API reference › @evolu/web › loadSqliteWasm

const loadSqliteWasm: Task<SqliteWasm, SqliteWasmError>;

Defined in: packages/web/src/Sqlite.ts:63

Loads SQLite from the sqliteWasmUrl of @evolu/sqlite-wasm for createWasmSqliteDriver. It passes the fetch to createSqliteWasm, which compiles the binary while it downloads when the server sends it as application/wasm, and from its bytes otherwise.

Start it in the worker's composition root, so SQLite loads while the worker waits for its database.