React - Full SPA renders without an index html? #3136
Unanswered
AgentEnder
asked this question in
Help & Questions
Replies: 1 comment 6 replies
-
|
Have you seen https://vike.dev/pre-rendering#can-i-use-ssg-spa ? Does it answer your question? |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I'm working on configuring an application that will have two build profiles. One gets deployed to CDNs and is fully static site generated. The other is a "preview" view of it that loads data at runtime and is a SPA, accessible from a subroute within an admin panel.
The config I was trying to use is below:
I
eventually landed on a working solution by using the above config, in combination with a.+prerender.tsfile in thepages/indexfolder that exportstrueNever mind, that makes the index pave "work", but the page errors on SSR. Ill try to make a minimal repro for this, but I am curious if this is just not a supported pattern? Im a bit at a loss on getting this to work with ssr false, no prerender, deployed to a static host.
Is this the expected way to set up a SPA that outputs an index.html file? It feels a bit odd still to require the index be prerendered in these cases, as the global context / data / etc will be different depending on the data that was loaded when bootstrapping the SPA
Beta Was this translation helpful? Give feedback.
All reactions