You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I export entries from +page, +page.server, and +server in the same route, only one of them will be run and used to generate the prerender entries. We should:
Throw an error when more than one entries declaration is found in the same route
Document the precedence, and this behavior
Reproduction
I'm not going to create a reproduction, since I'll be fixing this -- but if you want to do it yourself, create all three of the files mentioned above in a [slug] route, export entries from all three (with different return values), then run build. You'll only get the values from one of them built.
Logs
No response
System Info
no
Severity
annoyance
Additional Information
I also considered that we could merge the results from all of the entries exports, but that seems like encouraging silly behavior -- there's not any conceivable reason to want to have multiple entries exports per route.
The text was updated successfully, but these errors were encountered:
Describe the bug
If I export
entries
from+page
,+page.server
, and+server
in the same route, only one of them will be run and used to generate the prerender entries. We should:entries
declaration is found in the same routeReproduction
I'm not going to create a reproduction, since I'll be fixing this -- but if you want to do it yourself, create all three of the files mentioned above in a
[slug]
route, exportentries
from all three (with different return values), then runbuild
. You'll only get the values from one of them built.Logs
No response
System Info
Severity
annoyance
Additional Information
I also considered that we could merge the results from all of the
entries
exports, but that seems like encouraging silly behavior -- there's not any conceivable reason to want to have multipleentries
exports per route.The text was updated successfully, but these errors were encountered: