-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Labels
- P2: nice to haveNot breaking anything but nice to have (priority)Not breaking anything but nice to have (priority)pkg: astroRelated to the core `astro` package (scope)Related to the core `astro` package (scope)
Description
Astro Info
> astro "info"
Astro v4.2.4
Node v18.18.0
System Linux (x64)
Package Manager pnpm
Output static
Adapter none
Integrations none
Describe the Bug
When two dynamic routes return parameters on getStaticPaths
that result in the same URL the route with the lower priority according to the Routing Priority Order is silently ignored during build.
On the linked example:
/[foo].astro
generates the URLs/a
,/b
and/c
/[bar].astro
generates the URLs/c
,/d
and/e
Those two routes get sorted with /[bar].astro
before /[foo].astro
due to the alphabetical ordering rule. So /[bar].astro
generates its 3 routes and then /[foo].astro
generates just two of its routes with no other information provided to the developer:
> astro build
.... STUFF
generating static routes
21:30:54 ▶ src/pages/index.astro
21:30:54 └─ /index.html (+30ms)
21:30:54 ▶ src/pages/[bar].astro
21:30:54 ├─ /c/index.html (+2ms)
21:30:54 ├─ /d/index.html (+2ms)
21:30:54 └─ /e/index.html (+2ms)
21:30:54 ▶ src/pages/[foo].astro
21:30:54 ├─ /a/index.html (+2ms)
21:30:54 └─ /b/index.html (+1ms)
21:30:54 ✓ Completed in 84ms.
21:30:54 [build] 6 page(s) built in 1.40s
21:30:54 [build] Complete!
What's the expected result?
Ideally that should give at least a warning during the build.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-63iasx
Participation
- I am willing to submit a pull request for this issue.
Metadata
Metadata
Assignees
Labels
- P2: nice to haveNot breaking anything but nice to have (priority)Not breaking anything but nice to have (priority)pkg: astroRelated to the core `astro` package (scope)Related to the core `astro` package (scope)