Skip to content

ref(nextjs): Clean up client-side integrations code #6382

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

Conversation

lobsterkatie
Copy link
Member

This refactors the code in the nextjs SDK adding client-side integrations to:

  • Consolidate the logic, which currently is split between init and a helper function, to all live in the helper. Not only is this better practice in general, it also sets up for a future PR which will add a new integration. (Adding more code to the current somewhat-messy setup would just make it worse, and it's easier to fix it before that happens.)
  • Align the client-side code with the server-side code, for greater maintainability.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2022

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.57 KB (-0.01% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 60.59 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.36 KB (+0.02% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 54.15 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 20.12 KB (0%)
@sentry/browser - Webpack (minified) 65.75 KB (0%)
@sentry/react - Webpack (gzipped + minified) 20.14 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 45.95 KB (-0.04% 🔽)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.42 KB (+0.01% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 24.85 KB (+0.02% 🔺)
@sentry/replay index.js 37.08 KB (-0.33% 🔽)
@sentry/replay - Webpack (gzipped + minified) 37.06 KB (-0.32% 🔽)
@sentry/replay - Webpack (minified) 124.66 KB (-0.27% 🔽)

@lobsterkatie lobsterkatie requested a review from lforst December 2, 2022 09:20
@lobsterkatie lobsterkatie merged commit f09ec36 into master Dec 2, 2022
@lobsterkatie lobsterkatie deleted the kmclb-nextjs-match-addClientIntegrations-to-addServerIntegrations branch December 2, 2022 11:21
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