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

Dead links cause layout crash #22

Closed
sxzz opened this issue Oct 15, 2023 · 5 comments · Fixed by #23
Closed

Dead links cause layout crash #22

sxzz opened this issue Oct 15, 2023 · 5 comments · Fixed by #23

Comments

@sxzz
Copy link

sxzz commented Oct 15, 2023

So do Vue Macros, VueUse

@userquin
Copy link
Member

userquin commented Oct 15, 2023

@sxzz

On local works, running nr preview in pwa docs repo (VP build + preview), VP shows the not found page, 404.html, since the server is returning 404 status code.

The problem is the SPA configuration in Netlify, any request to a missing page will fallback to index.html with status code 200 (without redirection, just forwarding content). The SW will intercept the request and fallback to index.html since that page isn't in the SW precache manifest (there is an hydration missmatch error in the console).

@userquin
Copy link
Member

Check response in netlify docs using /xxx in home page (first screenshot) and the same request in local (last screenshot).

imagen

imagen

@userquin
Copy link
Member

and the hydration error:

imagen

@userquin
Copy link
Member

upps, something wrong on my local, missing sw....

@userquin
Copy link
Member

same behavior in local and Netlify, /xxx.html from sw with fallback content (/)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants