-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for SPA Mode #85
Comments
Yea that definitely seems like the kind of thing houdini should support. Unforunately, im not too familiar with the details of various adapters yet - any idea how we would be able to determine if we are running in spa mode? Now that the config file is a full on javascript file, we could always rely on a environment-based toggle if we have to 🤔 I'm currently working on a branch for #72 and #67 which i think would handle the actual details for this as well - ill keep you up to date |
Thanks Alec! Trying to get a feel for the code base so that I can help out on some of these issues. Hoping I can get myself up-to-speed soon. Edit: Sent the comment too soon. As for determining the adapter type, I'm thinking a better approach may be to add logic into the runtime to determine if there was SSR hydration and if not initialize empty values and leave the For the most part, a lot of this is already taken care of by SvelteKit's |
I absolutely agree that we want to avoid coupling to a particular adapter. The |
Yeah, I can't think of a universal way to know that any framework (Sapper, SvelteKit) would handle the loading to avoid the network request. I think there could be some automatic selection to be had from knowing the There's also the case where in SvelteKit someone can disable I think the only real way to know if SSR is happening by default is is to rely on an |
@plunkettscott - i think i have a working update to support the SPA mode. You'll have to add some logic in the config file to set the framework field to Mind testing out #95 and see if it works for you? |
With the release of |
Would supporting SvelteKit's
adapter-static
SPA mode be something you are willing to do? Currently the runtime does not work, expecting things likedocument.initialValue
to be set but is not because there is no SSR hydration.Quite a few people, myself included, embed the static assets into binaries we ship as part of the release process because we use languages that do not support SSR. In my case, that's embedding the assets in a Go application and serving them with an embedded file server.
Original SPA mode PR: sveltejs/kit#1181
The text was updated successfully, but these errors were encountered: