Skip to content

feat(nextjs): Add disableLogger option that automatically tree shakes logger statements #7908

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

Merged
merged 2 commits into from
Apr 21, 2023

Conversation

lforst
Copy link
Contributor

@lforst lforst commented Apr 19, 2023

This is just adding a very convenient way of treeshaking the logger we can put into docs snippets and the wizard.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 19, 2023

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 20.98 KB (0%)
@sentry/browser - ES5 CDN Bundle (minified) 65.49 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 19.52 KB (+0.01% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 57.95 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 21.12 KB (0%)
@sentry/browser - Webpack (minified) 68.9 KB (0%)
@sentry/react - Webpack (gzipped + minified) 21.14 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 48.99 KB (0%)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 28.55 KB (0%)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 26.78 KB (0%)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 45.35 KB (0%)
@sentry/replay - Webpack (gzipped + minified) 39.28 KB (0%)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 64.23 KB (0%)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 57.2 KB (0%)

@lforst lforst requested a review from AbhiPrasad April 19, 2023 14:50
Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, we can do the same thing in SvelteKit! (will add a note to the SDK stretch goals)

@Lms24
Copy link
Member

Lms24 commented Apr 20, 2023

Also, can/should we do the same for tree-shaking tracing code?

@lforst lforst merged commit 15d9102 into develop Apr 21, 2023
@lforst lforst deleted the lforst-nextjs-logger-tree-shake-utility branch April 21, 2023 13:08
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