Skip to content

Conversation

@Lms24
Copy link
Member

@Lms24 Lms24 commented Dec 2, 2022

In preparation of generating CDN bundles, this PR copies the WINDOW constant declaration from @sentry/browser to the Replay package and updates the imports to use the package-internal version of WINDOW. This has two advantages:

  • When building CDN bundles, we don't bundle contents from @sentry/browser anymore. This previously caused the generated bundles to not work correctly and it unnecessarily increased bundle size
  • By not importing anything from @sentry/browser we avoid a circular dependency one we export the Replay integration from the Browser SDK.

ref #6362

@Lms24 Lms24 requested a review from mydea December 2, 2022 08:59
@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%)
@sentry/browser - ES5 CDN Bundle (minified) 60.59 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.36 KB (+0.03% 🔺)
@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.97 KB (0%)
@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.01% 🔽)
@sentry/replay - Webpack (gzipped + minified) 37.05 KB (-0.01% 🔽)
@sentry/replay - Webpack (minified) 124.54 KB (-0.09% 🔽)

@Lms24 Lms24 force-pushed the lms-replay-WINDOW branch from ddf3ca4 to 4893d11 Compare December 2, 2022 09:24
@Lms24 Lms24 merged commit 8e94898 into master Dec 2, 2022
@Lms24 Lms24 deleted the lms-replay-WINDOW branch December 2, 2022 10:06
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.

3 participants