404 page missing CSS when 404 server Response redirects to static custom 404 page #7910
Labels
- P3: minor bug
An edge case that only affects very specific usage (priority)
feat: ssr
Related to SSR (scope)
What version of
astro
are you using?2.9.7
Are you using an SSR adapter? If so, which one?
Vercel
What package manager are you using?
pnpm
What operating system are you using?
Mac
What browser are you using?
Chrome, Safari
Describe the Bug
Perhaps a bit of an edge case, but with the following setup:
[...ssrPath].astro
redirects non-existing pages to 404 usingnew Response
but does no page rendering[...staticPath].astro
renders pages statically (includesexport const prerender = true
)/pages/404.md
The issue is: When deployed on Vercel, navigating to a non-existent page renders the custom 404 page, but without CSS.
Additional notes:
Response
is changed to an Astro redirect (return Astro.redirect('/404')
), CSS is included in the 404 page after the redirectvercel dev
orastro dev
, CSS is included after the 404 Response.What's the expected result?
CSS should be included in the custom 404 page rendered after a 404
Response
Link to Minimal Reproducible Example
repo
demo
Participation
The text was updated successfully, but these errors were encountered: