-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat(nextjs): Make tracing package treeshakable #5166
Conversation
size-limit report 📦
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! 🚀 🚀
packages/tracing/test/index.test.ts
Outdated
@@ -12,6 +12,11 @@ describe('index', () => { | |||
describe('Integrations', () => { | |||
it('is exported correctly', () => { | |||
Object.keys(Integrations).forEach(key => { | |||
// Skip BrowserTracing because it doesn't have a static id field. | |||
if (key !== 'BrowserTracing') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be the other way round, right?
if (key !== 'BrowserTracing') { | |
if (key === 'BrowserTracing') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup thanks 😄
This was removed in #5166 due to tree shaking concerns, however we have had a static ID for replay and it has been working fine so far.
Makes
@sentry/tracing
treeshakable from@sentry/nextjs
, by text-replacing__SENTRY_TRACING__
withfalse
in any bundler or pre-processor.Ref: https://getsentry.atlassian.net/browse/WEB-713