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(v7/bundle): Ensure CDN bundles do not overwrite window.Sentry #12579

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

mydea
Copy link
Member

@mydea mydea commented Jun 20, 2024

This was brought up in Slack - turns out we were always overwriting window.Sentry when a CDN bundle was loaded. This means that if a user e.g. loaded an integration via CDN, which is put on window.Sentry, this was overwritten if the loader fetched the base CDN bundle later.

This probably did not come up earlier because we may handle Sentry.Integrations specially, but not sure. This fix should ensure this works as expected!

Copy link
Member

@lforst lforst left a comment

Choose a reason for hiding this comment

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

dumb and simple. love it.

Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay, Feedback) - Webpack (gzipped) 80.83 KB (added)
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 71.77 KB (added)
@sentry/browser (incl. Tracing, Replay with Canvas) - Webpack (gzipped) 76.02 KB (added)
@sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped) 65.38 KB (added)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 35.64 KB (added)
@sentry/browser (incl. browserTracingIntegration) - Webpack (gzipped) 35.53 KB (added)
@sentry/browser (incl. Feedback) - Webpack (gzipped) 31.6 KB (added)
@sentry/browser (incl. sendFeedback) - Webpack (gzipped) 31.61 KB (added)
@sentry/browser - Webpack (gzipped) 22.78 KB (added)
@sentry/browser (incl. Tracing, Replay, Feedback) - ES6 CDN Bundle (gzipped) 79.05 KB (added)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 70.38 KB (added)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 36.06 KB (added)
@sentry/browser - ES6 CDN Bundle (gzipped) 25.29 KB (added)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 221.51 KB (added)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 109.1 KB (added)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 75.83 KB (added)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 39.34 KB (added)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 72.27 KB (added)
@sentry/react - Webpack (gzipped) 22.81 KB (added)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 90.03 KB (added)
@sentry/nextjs Client - Webpack (gzipped) 54.15 KB (added)
@sentry-internal/feedback - Webpack (gzipped) 17.34 KB (added)

@mydea mydea merged commit dccc77c into v7 Jun 20, 2024
74 checks passed
@mydea mydea deleted the fn/fix-bundles branch June 20, 2024 13:15
mydea added a commit that referenced this pull request Jun 21, 2024
)

v8 portion of #12579
(not that relevant there because no Loader support yet, but still...)
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