Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 BUG: SSR - dynamic routes are triggered by static files #3728

Closed
1 task
yassinedoghri opened this issue Jun 27, 2022 · 1 comment · Fixed by #4000
Closed
1 task

🐛 BUG: SSR - dynamic routes are triggered by static files #3728

yassinedoghri opened this issue Jun 27, 2022 · 1 comment · Fixed by #4000
Assignees
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)

Comments

@yassinedoghri
Copy link

What version of astro are you using?

1.0.0-beta.57

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

Node.js

What package manager are you using?

npm

What operating system are you using?

Linux (Ubuntu 22.04)

Describe the Bug

When using SSR, dynamic routes get unexpectedly triggered by static files.

This issue was initially found when using the astro-i18next component with SSR: yassinedoghri/astro-i18next#12

I've mentioned this issue on discord https://discord.com/channels/830184174198718474/872579324446928896/990992832317759558

I guess this is not intended and may create side-effects.

To see the issue in the linked minimal reproduction:

  1. run npm run server
  2. open the preview in a new window
    image
  3. follow the instructions on the page

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-ewjnzr

Participation

  • I am willing to submit a pull request for this issue.
@tony-sull tony-sull added - P4: important Violate documented behavior or significantly impacts performance (priority) s1-small labels Jun 28, 2022
@tony-sull
Copy link
Contributor

Yep, that's definitely a bug! It looks like Astro's internal server is ignoring public files and jumps right to matching the route to src/pages

In the reproduction, if you add a favicon.ico file to public it will actually work as expected in dev but build still ignores public. We'll get this cleaned up soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants