Skip to content

Commit 551af85

Browse files
SG60Lms24
authored andcommitted
fix(sveltekit): avoid importing fs and path in workers contexts
1 parent 86644ca commit 551af85

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

packages/sveltekit/src/server-common/rewriteFramesIntegration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
join,
88
rewriteFramesIntegration as originalRewriteFramesIntegration,
99
} from '@sentry/core';
10-
import { WRAPPED_MODULE_SUFFIX } from '../vite/autoInstrument';
10+
import { WRAPPED_MODULE_SUFFIX } from '../vite/constants';
1111
import type { GlobalWithSentryValues } from '../vite/injectGlobalValues';
1212

1313
type StackFrameIteratee = (frame: StackFrame) => StackFrame;

packages/sveltekit/src/vite/autoInstrument.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { ExportNamedDeclaration } from '@babel/types';
44
import { parseModule } from 'magicast';
55
import type { Plugin } from 'vite';
66

7-
export const WRAPPED_MODULE_SUFFIX = '?sentry-auto-wrap';
7+
import { WRAPPED_MODULE_SUFFIX } from './constants';
88

99
export type AutoInstrumentSelection = {
1010
/**
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const WRAPPED_MODULE_SUFFIX = '?sentry-auto-wrap';

packages/sveltekit/src/vite/sourceMaps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { sentryVitePlugin } from '@sentry/vite-plugin';
99
import { type Plugin, type UserConfig, loadConfigFromFile } from 'vite';
1010

1111
import MagicString from 'magic-string';
12-
import { WRAPPED_MODULE_SUFFIX } from './autoInstrument';
12+
import { WRAPPED_MODULE_SUFFIX } from './constants';
1313
import type { GlobalSentryValues } from './injectGlobalValues';
1414
import { VIRTUAL_GLOBAL_VALUES_FILE, getGlobalValueInjectionCode } from './injectGlobalValues';
1515
import { getAdapterOutputDir, getHooksFileName, loadSvelteConfig } from './svelteConfig';

0 commit comments

Comments
 (0)