You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I've been looking in to the SPA Mode and I'm really liking the idea, but still left wondering.... what is the fallback page actually supposed to contain? I have found no reference to its actual contents.
From the adapter-static github page:
The fallback page is a blank HTML page that loads your SvelteKit app and navigates to the correct route. For example Surge, a static web host, lets you add a 200.html file that will handle any requests that don't otherwise match.
This seems a bit vague to me and not sure how it would apply to SvelteKit specifically. In the Surge example it is simply showing the HTML file as being:
<!-- 200.html -->
<script src="app.js"></script>
What would the SvelteKit equivalent be?
Thanks!
(PS: Posting a new discussion as suggested in original thread)
@BillBuilt I was wondering for a long time about this; I tried to take it literally blank to start, and to my surprise, the fallback page IS CREATED for you by the adapter-static; it is not an input file you have to create! The documentation is quite cryptic on this subject. Do you want another surprise? Try NOT setting prerender: { enabled: false }! You will receive an identical fallback page in every place you have a route (.svelte file). While being messy, it is surprisingly useful; you won't need special SPA settings on your web server to avoid 404 error when the user starts from anything but the / route. @dummdidumm I will reproduce my answer if @BillBuilt opens another discussion.
Hello,
I've been looking in to the SPA Mode and I'm really liking the idea, but still left wondering.... what is the fallback page actually supposed to contain? I have found no reference to its actual contents.
From the adapter-static github page:
This seems a bit vague to me and not sure how it would apply to SvelteKit specifically. In the Surge example it is simply showing the HTML file as being:
What would the SvelteKit equivalent be?
Thanks!
(PS: Posting a new discussion as suggested in original thread)
Originally posted by @BillBuilt in #3365 (comment)
The text was updated successfully, but these errors were encountered: