Dexie.js ♥ SvelteKit
It seems these SSR frameworks may need some extra attention for library authors. After I dug into using dexie with SvelteKit I found more things in need for change to improve the experience of using dexie with SvelteKit better. Some important changes are incorporated in dexie@4.0.1-alpha.10. Install dexie@next rather than just dexie@latest to get it.
Install dexie@next for best experience with Svelte
The latest improvements for Svelte and SvelteKit are experienced by installing dexie@next rather than the stable dexie.
In PR #1691, I fixed the following three issues that Svelte- and SvelteKit users might have been struggeling with for a while:
- SSR check needed in every use of liveQuery()
- Typing incompability between Dexie’s
Observable<T>
and Svelte's Readable - “SyntaxError: Cannot use import statement outside a module” when using dexie-cloud-addon