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

fix(prerendering): never prerender custom 500 routes #8031

Closed
wants to merge 5 commits into from

Conversation

lilnasy
Copy link
Contributor

@lilnasy lilnasy commented Aug 10, 2023

Changes

Future Work

  • Custom 500 routes don't work in dev mode at all.

Testing

Pending

Docs

Does not affect usage

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Aug 10, 2023
@changeset-bot
Copy link

changeset-bot bot commented Aug 10, 2023

🦋 Changeset detected

Latest commit: 06350df

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@lilnasy
Copy link
Contributor Author

lilnasy commented Aug 10, 2023

To be clear, these routes are currently rendered just-in-time, or don't work at all (at least, with the node adapter.)

This change prevents the manifest corruption that occurs when prerendering is attempted.

@matthewp
Copy link
Contributor

sgtm

@lilnasy lilnasy force-pushed the prerender-eligibility branch from aee6ac0 to 3a734b1 Compare August 11, 2023 19:48
@lilnasy
Copy link
Contributor Author

lilnasy commented Aug 11, 2023

Astro core doesn't support prerendering 404.astro, it is prerendered into 404.html but the router renders it just-in-time anyway. However, the netlify adapter is able to achieve the effect by using _redirects, so it would be a regression to consider it ineligible for prerendering.

Only considering 500.astro ineligible still solves the immediate issue.

I think actually prerendering using the prerendered 404 and 500 routes can be revisited after the "pipeline" refactors.

@lilnasy lilnasy changed the title fix(prerendering): never prerender custom 404 or 500 routes fix(prerendering): never prerender custom 500 routes Aug 11, 2023
@lilnasy
Copy link
Contributor Author

lilnasy commented Aug 14, 2023

There is a better way.

Closing in favor of #8070

@lilnasy lilnasy closed this Aug 14, 2023
@lilnasy lilnasy deleted the prerender-eligibility branch August 22, 2023 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prerended custom 500 page does not include imported stylesheets
2 participants