-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Infinite loop when accessing prerendered +server.js
from matching non-prerendered +server.js
#12778
Comments
A variation of this is when you have a prerendered |
We currently don't have any check for prerendered routes since they're removed from the manifest. We only have a check for static assets before it tries to respond with a route.
Do you think we should re-include prerendered routes in the manifest somehow so that we can perform this check? |
Can also happen with spread routes as seen in #11927 |
Probably related: #12739 |
Describe the bug
Given this structure
with
examples.json
being prerendered and[id].json
fetchingexamples.json
, the server is fine at dev time but crashes in prod. The manifest seems to not properly resolve the correct route, instead of fetching the prerenderedexamples.json
it recursively calls itself in[id].json
. My guess is that the runtime first tries to find a matching "live" route before checking if a prerendered one exists.Reproduction
https://stackblitz.com/edit/sveltejs-kit-template-default-fhjdvp?file=src%2Froutes%2F%2Bpage.server.js
Logs
No response
System Info
Severity
annoyance
Additional Information
can be worked around by making sure the routes don't match
The text was updated successfully, but these errors were encountered: