Skip to content

Commit e0c9059

Browse files
authored
fix: Export logger from sveltekit worker (#16716)
### Issue The `logger` was missing from SvelteKit's worker environment exports, causing `Sentry.logger` to be `null` when deploying to Cloudflare Pages. Users experienced: - `Sentry.logger` is `null` in production - `logger.info()` throws access violations - Works fine locally but fails in Cloudflare Pages deployment Cloudflare Pages uses the **worker runtime environment** (not Node.js) when `@sveltejs/adapter-cloudflare` is configured which is why logger must be exported from there. [official Cloudflare Pages Functions documentation](https://developers.cloudflare.com/pages/functions/) https://developers.cloudflare.com/pages/framework-guides/deploy-a-svelte-kit-site/#functions-setup
1 parent ebc1e26 commit e0c9059

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/sveltekit/src/worker/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export {
4949
isEnabled,
5050
lastEventId,
5151
linkedErrorsIntegration,
52+
logger,
5253
requestDataIntegration,
5354
rewriteFramesIntegration,
5455
Scope,

0 commit comments

Comments
 (0)