Skip to content

Commit 2c08aa1

Browse files
committed
fix(remix): Add explicit @sentry/node exports.
1 parent 1167436 commit 2c08aa1

File tree

1 file changed

+47
-1
lines changed

1 file changed

+47
-1
lines changed

packages/remix/src/index.server.ts

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,55 @@ import { instrumentServer } from './utils/instrumentServer';
66
import { buildMetadata } from './utils/metadata';
77
import type { RemixOptions } from './utils/remixOptions';
88

9+
// We need to explicitly export @sentry/node as they end up under `default` in ESM builds
10+
// See: https://github.com/getsentry/sentry-javascript/issues/8474
11+
export {
12+
addGlobalEventProcessor,
13+
addBreadcrumb,
14+
captureException,
15+
captureEvent,
16+
captureMessage,
17+
configureScope,
18+
createTransport,
19+
extractTraceparentData,
20+
getActiveTransaction,
21+
getHubFromCarrier,
22+
getCurrentHub,
23+
Hub,
24+
makeMain,
25+
Scope,
26+
startTransaction,
27+
SDK_VERSION,
28+
setContext,
29+
setExtra,
30+
setExtras,
31+
setTag,
32+
setTags,
33+
setUser,
34+
spanStatusfromHttpCode,
35+
trace,
36+
withScope,
37+
autoDiscoverNodePerformanceMonitoringIntegrations,
38+
makeNodeTransport,
39+
defaultIntegrations,
40+
defaultStackParser,
41+
lastEventId,
42+
flush,
43+
close,
44+
getSentryRelease,
45+
addRequestDataToEvent,
46+
DEFAULT_USER_INCLUDES,
47+
extractRequestData,
48+
deepReadDirSync,
49+
Integrations,
50+
Handlers,
51+
} from '@sentry/node';
52+
53+
// Keeping the `*` exports for backwards compatibility and types
54+
export * from '@sentry/node';
55+
956
export { ErrorBoundary, withErrorBoundary } from '@sentry/react';
1057
export { remixRouterInstrumentation, withSentry } from './performance/client';
11-
export * from '@sentry/node';
1258
export { wrapExpressCreateRequestHandler } from './utils/serverAdapters/express';
1359

1460
function sdkAlreadyInitialized(): boolean {

0 commit comments

Comments
 (0)