Skip to content

Commit af1fbff

Browse files
committed
fix(react): missing route module exports
1 parent c4c361e commit af1fbff

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

packages/fastify-react/server.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,19 @@ function getRouteModuleExports (routeModule) {
117117
streaming: routeModule.streaming,
118118
clientOnly: routeModule.clientOnly,
119119
serverOnly: routeModule.serverOnly,
120+
// Server configure function
121+
configure: routeModule.configure,
122+
// Route-level Fastify hooks
123+
onRequest: routeModule.onRequest ?? undefined,
124+
preParsing: routeModule.preParsing ?? undefined,
125+
preValidation: routeModule.preValidation ?? undefined,
126+
preHandler: routeModule.preHandler ?? undefined,
127+
preSerialization: routeModule.preSerialization ?? undefined,
128+
onError: routeModule.onError ?? undefined,
129+
onSend: routeModule.onSend ?? undefined,
130+
onResponse: routeModule.onResponse ?? undefined,
131+
onTimeout: routeModule.onTimeout ?? undefined,
132+
onRequestAbort: routeModule.onRequestAbort ?? undefined,
120133
}
121134
}
122135

0 commit comments

Comments
 (0)