Astro Info
Astro v5.16.6
Vite v6.4.1
Node v22.18.0
System Windows (x64)
Package Manager npm
Output static
Adapter none
Integrations @astrojs/sitemap (v3.6.0)
If this issue only occurs in one browser, which browser is a problem?
all
Describe the Bug
If filename of a file in public/ dir is same as filename produced by APIRoute in root,
Example
public/robots.txt exists
src/pages/robots.txt.ts exists
Difference in behaviour:
astro dev: public route takes precedence
astro build: pages route takes precedence
Normal behaviour if no conflicting routes (i.e., only one of those files exists)
What's the expected result?
Not documented as per my knowledge: https://docs.astro.build/en/guides/routing/#route-priority-order
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-rfjccbca
Participation
Astro Info
If this issue only occurs in one browser, which browser is a problem?
all
Describe the Bug
If filename of a file in
public/dir is same as filename produced byAPIRoutein root,Example
public/robots.txtexistssrc/pages/robots.txt.tsexistsDifference in behaviour:
astro dev: public route takes precedenceastro build: pages route takes precedenceNormal behaviour if no conflicting routes (i.e., only one of those files exists)
What's the expected result?
Not documented as per my knowledge: https://docs.astro.build/en/guides/routing/#route-priority-order
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-rfjccbca
Participation