diff --git a/packages/nextjs/src/client/rewriteFramesIntegration.ts b/packages/nextjs/src/client/rewriteFramesIntegration.ts index 5c45ff63d983..961d5a7e83c6 100644 --- a/packages/nextjs/src/client/rewriteFramesIntegration.ts +++ b/packages/nextjs/src/client/rewriteFramesIntegration.ts @@ -1,8 +1,9 @@ import { defineIntegration } from '@sentry/core'; import { rewriteFramesIntegration as originalRewriteFramesIntegration } from '@sentry/integrations'; import type { IntegrationFn, StackFrame } from '@sentry/types'; +import { GLOBAL_OBJ } from '@sentry/utils'; -const globalWithInjectedValues = global as typeof global & { +const globalWithInjectedValues = GLOBAL_OBJ as typeof GLOBAL_OBJ & { __rewriteFramesAssetPrefixPath__: string; }; diff --git a/packages/nextjs/src/client/tunnelRoute.ts b/packages/nextjs/src/client/tunnelRoute.ts index b3511e7ab70f..3c93b93e41f2 100644 --- a/packages/nextjs/src/client/tunnelRoute.ts +++ b/packages/nextjs/src/client/tunnelRoute.ts @@ -1,9 +1,9 @@ import type { BrowserOptions } from '@sentry/react'; -import { dsnFromString, logger } from '@sentry/utils'; +import { GLOBAL_OBJ, dsnFromString, logger } from '@sentry/utils'; import { DEBUG_BUILD } from '../common/debug-build'; -const globalWithInjectedValues = global as typeof global & { +const globalWithInjectedValues = GLOBAL_OBJ as typeof GLOBAL_OBJ & { __sentryRewritesTunnelPath__?: string; }; diff --git a/packages/nextjs/src/server/rewriteFramesIntegration.ts b/packages/nextjs/src/server/rewriteFramesIntegration.ts index f27ff9a9993d..912a7635533e 100644 --- a/packages/nextjs/src/server/rewriteFramesIntegration.ts +++ b/packages/nextjs/src/server/rewriteFramesIntegration.ts @@ -5,9 +5,9 @@ import { rewriteFramesIntegration as originalRewriteFramesIntegration, } from '@sentry/integrations'; import type { IntegrationFn, StackFrame } from '@sentry/types'; -import { escapeStringForRegex } from '@sentry/utils'; +import { GLOBAL_OBJ, escapeStringForRegex } from '@sentry/utils'; -const globalWithInjectedValues = global as typeof global & { +const globalWithInjectedValues = GLOBAL_OBJ as typeof GLOBAL_OBJ & { __rewriteFramesDistDir__?: string; };