-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Describe the problem
Related discussion: #4339
File-based stores in sveltekit are basically unusable since they leak state across SSR requests. This is a major flaw in the design of SvelteKit and makes it practically unusable compared to other frameworks.
Describe the proposed solution
I have experience playing around with Vue's sand-boxing system that they use to isolate module state from each other using node's vm features. I would be happy to collaborate with someone, with the goal of creating a svelte kit adapter to achieve this.
Using stores like normal JavaScript I find is generally the most convenient and not needing to worry about potential security vulnerabilities between shared user state is a big plus.
Many other developers have faced similar issues and there seems to be a consensus that this is needed.
Alternatives considered
People have considered using $page.stuff and contexts but they clear during client-side navigation, destroying state.
Importance
i cannot use SvelteKit without it
Additional Information
No response
