Skip to content

fix: prioritize dynamic prerendered routes over dynamic server routes #7235

Merged
MoustaphaDev merged 13 commits intomainfrom
mk/prioritize-prerendered-routes
May 30, 2023
Merged

fix: prioritize dynamic prerendered routes over dynamic server routes #7235
MoustaphaDev merged 13 commits intomainfrom
mk/prioritize-prerendered-routes

Conversation

@MoustaphaDev
Copy link
Member

@MoustaphaDev MoustaphaDev commented May 29, 2023

Changes

Fix #7200

Currently the ordering conflicts of dynamic static and server routes are resolved alphabetically. However, dynamic static routes should always be prioritized in that case.

Testing

  • Added unit tests for the matchAllRoutes function to verify that the ordering of matched routes is correct
  • Added unit tests to verify that individual routes are matched correctly

Docs

The current behavior didn't change, but I thought it would be good to add some missing info to the docs
withastro/docs#3374

@changeset-bot
Copy link

changeset-bot bot commented May 29, 2023

🦋 Changeset detected

Latest commit: 5a1f8c2

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 May 29, 2023
@MoustaphaDev MoustaphaDev marked this pull request as draft May 29, 2023 17:03
@MoustaphaDev MoustaphaDev marked this pull request as ready for review May 30, 2023 12:47
Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@MoustaphaDev MoustaphaDev merged commit ee2aca8 into main May 30, 2023
@MoustaphaDev MoustaphaDev deleted the mk/prioritize-prerendered-routes branch May 30, 2023 14:12
@astrobot-houston astrobot-houston mentioned this pull request May 30, 2023
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.

Inconsistent route order priority in SSR/Hybrid output mode

2 participants