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

Handle unmatched 404 when using prerender in dev mode #5983

Merged
merged 2 commits into from
Jan 25, 2023

Conversation

natemoo-re
Copy link
Member

Changes

  • Closes [prerender] Error with getStaticPaths in v2.0.1 #5975
  • In static mode, routes that match a dynamic route but don't match a returned getStaticPaths call return 404
  • This was not the case when using prerender in server mode in the dev server
  • This PR updates our logic to account for prerender when ssr is true

Testing

Tests updated

Docs

Bug fix only

@changeset-bot
Copy link

changeset-bot bot commented Jan 25, 2023

🦋 Changeset detected

Latest commit: c727e53

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

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Jan 25, 2023
@natemoo-re natemoo-re merged commit b53e071 into main Jan 25, 2023
@natemoo-re natemoo-re deleted the fix/dev-prerender-404 branch January 25, 2023 19:57
@astrobot-houston astrobot-houston mentioned this pull request Jan 25, 2023
matthewp pushed a commit that referenced this pull request Jan 26, 2023
* fix(#5975): unmatched static paths should 404 during dev

* chore: add changeset

Co-authored-by: Nate Moore <nate@astro.build>
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.

[prerender] Error with getStaticPaths in v2.0.1
2 participants