Closed sxzz closed 10 months ago
@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).
Check response in netlify docs using /xxx
in home page (first screenshot) and the same request in local (last screenshot).
and the hydration error:
upps, something wrong on my local, missing sw....
same behavior in local and Netlify, /xxx.html
from sw with fallback content (/
)
Get Started
So do Vue Macros, VueUse