Skip to content
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

serve command not serving prerendered SSR or static export content #1072

Closed
thescientist13 opened this issue Feb 20, 2023 · 0 comments · Fixed by #1073 or #1034
Closed

serve command not serving prerendered SSR or static export content #1072

thescientist13 opened this issue Feb 20, 2023 · 0 comments · Fixed by #1073 or #1034
Labels
Milestone

Comments

@thescientist13
Copy link
Member

thescientist13 commented Feb 20, 2023

Type of Change

Bug

Summary

After upgrade to v0.28.0-alpha.2, a project that was originally using prerender: true and an SSR route now shows a 404 page when serving the content.
AnalogStudiosRI/www.tuesdaystunes.tv#110
Screen Shot 2023-02-20 at 9 38 07 AM

It should be noted the index.html IS correctly generated, just not being served as expected to the browser.

Details

Doing a little digging and I think what happened is now with the fix to #1059 in place, both static server and hybrid server are not running together anymore for just static content (a good thing!). However, now that no static server is running, this line basically precludes prerendered SSR content from being returned now.

if (isSPA || (matchingRoute && !matchingRoute.isSSR) || url.pathname.split('.').pop() === 'html') {
  ...
}

So basically need to make sure static and hybrid server are working together here:

  1. Make sure static server only handles static (or prerendered SSR) routes
  2. Let all non static routes get handled by hybrid server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
1 participant