Dexie.js ♥ SvelteKit

David Fahlander
Dexie.js
Published in
Mar 29, 2023

--

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:

  1. SSR check needed in every use of liveQuery()
  2. Typing incompability between Dexie’s Observable<T> and Svelte's Readable
  3. “SyntaxError: Cannot use import statement outside a module” when using dexie-cloud-addon

--

--

David Fahlander
Dexie.js

Author of Dexie.js. Passionate about simplifying app development. Javascript. Isomorphic app, data fetching and React.