if we don't pre-render all pages, then we need a production server #1475
Replies: 2 comments 2 replies
-
Each URL needs to be pre-rendered so that an HTML file is generated. That's why That said, SSR can be disabled for some pages: pre-rendering will then render an empty shell for these pages. That achieves what you want. |
Beta Was this translation helpful? Give feedback.
-
When the dist/client folder is served, initial navigation to pages which don't have a html file falls back to serving the index page html, if the static host is configured to do so. Do you think this is worth it to implement in Vike? I don't need this, I just had this idea. (someone asked about this on discord) Quoting:
|
Beta Was this translation helpful? Give feedback.
-
I tried creating this folder structure:
prerender: { partial: true }
pnpm build
cd dist/client
pnpx sirv-cli --single
If I open
/
, it loads the index page.If I open
/posts/1
, it still loads the index page(unexpected).If I open
/
then callnavigate('/posts/1')
, it navigates just fine.Why is there such a limitation?
Couldn't the client-side router handle the initial navigation?
Can we support a static dist/client output even without any pre-rendering?
Beta Was this translation helpful? Give feedback.
All reactions