Kysely dialect for wa-sqlite that runs SQL in a Web Worker and stores data in OPFS (Origin Private File System) or IndexedDB. Version 1.2.1 is the latest stable. Released alongside kysely-sqlite-tools monorepo. Key differentiators: no need for custom response headers (unlike official wasm dialect), supports caching/memoization, and provides built-in worker and wasm URL helpers. Requires peer dependencies @subframe7536/sqlite-wasm >=0.5.0 and kysely >=0.26. Fully typed with TypeScript declarations.
npm install kysely-wasqlite-workerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a Kysely instance using WaSqliteWorkerDialect, creates a table, inserts a row, selects all, and destroys the database.
Use useDefaultWorker() or pass a custom Worker to the dialect config.
Use ESM imports and ensure your project or bundler supports ESM.
Add `worker: { format: 'es' }` to vite.config.Ensure your app is served over HTTPS or localhost. Check browser compatibility for Locks API and FileSystemSyncAccessHandle.
Use only in a browser environment.
Serve the app over localhost or HTTPS. For development, use a local server (e.g., Vite dev server).
Switch to HTTPS or localhost.
Use `import { useDefaultWorker } from 'kysely-wasqlite-worker'` instead.Use `new WaSqliteWorkerDialect({...})`.