Seeking Help with Sveltekit + Effect Integration: Loader Dependency Tracking Issue
Hi everyone!
I'm working on a Sveltekit + Effect (

) integration and I'm having the following problem.
This is more of a Sveltekit problem than an Effect problem, but as several people have been working in Sveltekit integrations maybe someone has already solve it (@giacomo, @francis, @Magick).
I'm running a
-
- implementation: https://github.com/mateoroldos/sveltekit-effect-template/blob/89200adc2ff8ab282edafbc98bd88e87d3d26e51/src/routes/%2Bpage.server.ts#L10
The problems is that Sveltekit tracks loader dependencies to avoid unnecesary data invalidations – for example when the client navigates to a new page that shares a layout with the previous page, the layout loader doesn't re-run.
But when running my loader functions with Effect, Sveltekit seems to miss this dependency tracking, and all loader functions re-run on every navigation.
If anyone has solved this issue please let me know, or maybe there is better way of integrating Effect to this kind of meta-frameworks.
Extra: it would be nice to add a Svelte Discord channel.
Both technologies have something in common – once you use them there is no way back

I'm working on a Sveltekit + Effect (
This is more of a Sveltekit problem than an Effect problem, but as several people have been working in Sveltekit integrations maybe someone has already solve it (@giacomo, @francis, @Magick).
I'm running a
runLoader function that executes effects on +page.server.ts load and then maps the result to what Sveltekit expects from a loader.-
runLoader: https://github.com/mateoroldos/sveltekit-effect-template/blob/89200adc2ff8ab282edafbc98bd88e87d3d26e51/src/lib/server/run-loader.ts#L12- implementation: https://github.com/mateoroldos/sveltekit-effect-template/blob/89200adc2ff8ab282edafbc98bd88e87d3d26e51/src/routes/%2Bpage.server.ts#L10
The problems is that Sveltekit tracks loader dependencies to avoid unnecesary data invalidations – for example when the client navigates to a new page that shares a layout with the previous page, the layout loader doesn't re-run.
But when running my loader functions with Effect, Sveltekit seems to miss this dependency tracking, and all loader functions re-run on every navigation.
If anyone has solved this issue please let me know, or maybe there is better way of integrating Effect to this kind of meta-frameworks.
Extra: it would be nice to add a Svelte Discord channel.
Both technologies have something in common – once you use them there is no way back
