Skip to content

Commit 65154e3

Browse files
committed
fix: send in module conditionally since it may not be available in ES contexts
1 parent 23f0ac2 commit 65154e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/remix/src/server/instrumentServer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ export const makeWrappedCreateRequestHandler = (options?: { instrumentTracing?:
480480
export function instrumentServer(options?: { instrumentTracing?: boolean }): void {
481481
const pkg = loadModule<{
482482
createRequestHandler: CreateRequestHandlerFunction;
483-
}>('@remix-run/server-runtime', module);
483+
}>('@remix-run/server-runtime', typeof module !== 'undefined' ? module : undefined);
484484

485485
if (!pkg) {
486486
DEBUG_BUILD && debug.warn('Remix SDK was unable to require `@remix-run/server-runtime` package.');

0 commit comments

Comments
 (0)