Skip to content

Conversation

@Fryuni
Copy link
Member

@Fryuni Fryuni commented Oct 19, 2024

Changes

The route was being added as the last route in the list, making it the lowest priority. The solution would be to either add it before the routes are sorted by priority or make it higher than other routes.

IMO internal routes should come first since they are required for native Astro features to work, so adding it to the front of the list is enough. If we think they should follow the normal route priority then the fix is different (insert the route based on the priority rules).

Testing

Added a conflicting route on the e2e test fixture to reproduce the problem.

Docs

Maybe document the prefixes reserved for Astro functionality (_server-islands/, _actions/ and _astro/)

@changeset-bot
Copy link

changeset-bot bot commented Oct 19, 2024

🦋 Changeset detected

Latest commit: 394e5e1

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 Oct 19, 2024
@Fryuni Fryuni requested review from ematipico and matthewp October 19, 2024 21:40
Copy link
Member

@martrapp martrapp left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

Looks good to me. If possible, I would send a PR to the docs as you suggested. I think it's important to set expectations for the users (and us).

Copy link
Contributor

@matthewp matthewp left a comment

Choose a reason for hiding this comment

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

beat me to it, thanks so much!

@matthewp matthewp merged commit e9e8080 into main Oct 21, 2024
13 checks passed
@matthewp matthewp deleted the fryuni/server-island-dynamic-route-conflict branch October 21, 2024 16:13
@astrobot-houston astrobot-houston mentioned this pull request Oct 21, 2024
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.

Catch all page ([...slug].astro) catch all Server island requests

4 participants