Skip to content

Commit 5aa9d54

Browse files
committed
fix(sveltekit): avoid importing fs and path in workers contexts
1 parent 218c2cf commit 5aa9d54

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
@@ -5,7 +5,7 @@ import type { ExportNamedDeclaration } from '@babel/types';
55
import { parseModule } from 'magicast';
66
import type { Plugin } from 'vite';
77

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

1010
export type AutoInstrumentSelection = {
1111
/**
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
@@ -8,7 +8,7 @@ import { sentryVitePlugin } from '@sentry/vite-plugin';
88
import type { Plugin } from 'vite';
99

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

0 commit comments

Comments
 (0)