Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sveltekit): Explicitly export Node SDK exports #7644

Merged
merged 2 commits into from
Mar 30, 2023

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Mar 29, 2023

This PR fixes Node SDK exports not being available in prod builds. For example, calling Sentry.withScope(...) throws an error because withScope is not defined on the top-level namespace. This is because for CJS, Vite puts wildcard-exported properties into the default property rather than onto the namespace in production builds.

@Lms24 Lms24 force-pushed the lms/sveltekit-fix-node-exports branch from 73de930 to dcf256a Compare March 29, 2023 14:26
@Lms24 Lms24 marked this pull request as ready for review March 29, 2023 14:26
@Lms24 Lms24 requested a review from AbhiPrasad March 29, 2023 14:26
@Lms24 Lms24 self-assigned this Mar 29, 2023
@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 20.62 KB (-0.02% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 64.4 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 19.15 KB (-0.01% 🔽)
@sentry/browser - ES6 CDN Bundle (minified) 56.78 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 21.53 KB (0%)
@sentry/browser - Webpack (minified) 72 KB (0%)
@sentry/react - Webpack (gzipped + minified) 21.55 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 51.98 KB (0%)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 28.16 KB (-0.01% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 26.36 KB (-0.01% 🔽)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 44.74 KB (0%)
@sentry/replay - Webpack (gzipped + minified) 38.86 KB (0%)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 63.41 KB (-0.01% 🔽)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 56.49 KB (-0.01% 🔽)

@Lms24 Lms24 merged commit a3dfde6 into develop Mar 30, 2023
@Lms24 Lms24 deleted the lms/sveltekit-fix-node-exports branch March 30, 2023 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants