SvelteStack / svelte-query

Performant and powerful remote data synchronization for Svelte
https://sveltequery.vercel.app
MIT License
822 stars 30 forks source link

SvelteKit integration #39

Closed yussdev closed 2 years ago

yussdev commented 3 years ago

is there a way to integrate svelte-query with SvelteKit ?

tradaonline commented 3 years ago

Any update on this issue? I'm waiting for this too. Hope coming soon.

Jonzy3000 commented 3 years ago

Is it related to https://github.com/SvelteStack/svelte-query/issues/22?

benmccann commented 3 years ago

detect-node 2.1.0 now has an ESM version. Can anyone who hit this issue check if it is now fixed?

benmccann commented 3 years ago

This should be considered fixed now that https://github.com/SvelteStack/svelte-query/pull/44 has been merged

benmccann commented 3 years ago

svelte-query 1.4.1 has been released and should be fully compatible with SvelteKit

benmccann commented 3 years ago

It looks like there's still a minor issue, but this can be closed in favor of https://github.com/SvelteStack/svelte-query/issues/45

freddez commented 3 years ago

Does someone have a working example with sveltekit ? I always get this error :

ReferenceError: require is not defined
    at /node_modules/broadcast-channel/dist/es/method-chooser.js:19:20
freddez commented 3 years ago

Does someone have a working example with sveltekit ? I always get this error :

ReferenceError: require is not defined
    at /node_modules/broadcast-channel/dist/es/method-chooser.js:19:20

Sorry if it is the wrong channel, but I've fixed my issue by adding :

optimizeDeps: {include: ['broadcast-channel']},

in svelte.config.js (config.kit.vite.optimizeDeps)

SomaticIT commented 2 years ago

Hello,

A new version (v1.5.0) of this library has been published today. This version makes broadcast-channel an optional dependency. This should fix all problems with svelte-kit.

If you need to use the experimental broadcastQueryClient, you now need to install it manually (see: broadcastQueryClient).

If you still encounter issues with v1.5.0. Please open a new issue.

lkj4 commented 2 years ago

how does it integrate with SvelteKit's load function which provides a super-powered fetch, does svelte-query deal with this and all other SvelteKit extras? Would love to see this in the readme right at the top btw.