Custom server entry files should allow for omitting the default export #14387
rossipedia
started this conversation in
Proposals
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I think it would be helpful / intuitive to allow for a custom server entry file to support omitting the
default
export, falling back to the version that RR supplies when the entry file is missing.Most apps will likely want to customize error handling (and potentially the new Observability exports), yet don't want to have to maintain the server handler boilerplate.
For example, this would be a valid
entry.server.tsx
:Possible alternatives
Export the default
handleRequest
fromreact-router
(or possibly a@react-router/defaults
package):Beta Was this translation helpful? Give feedback.
All reactions