Skip to content

Inconsistent route order priority in SSR/Hybrid output mode #7200

@TheOtterlord

Description

@TheOtterlord

What version of astro are you using?

2.5.5

Are you using an SSR adapter? If so, which one?

Node

What package manager are you using?

npm

What operating system are you using?

Linux

What browser are you using?

Firefox

Describe the Bug

Route Priority Order favours static pages over SSR, but all routes alphabetically in development. This causes a mismatch between what the user sees in development vs production.

As an example, we have two rest parameter routes. [...page].astro (SSR) and [...slug].astro (static).

  • In development [...page].astro takes priority because of the alphabetical ordering.
  • In production (at least in the case of the Node adapter) generated static pages of [...slug].astro take priority, leaving [...page.astro] any non-static routes.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-dxo1jg?file=src%2Fpages%2Fblog%2F[...page].astro&on=stackblitz

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    - P4: importantViolate documented behavior or significantly impacts performance (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions