sentry-javascript icon indicating copy to clipboard operation
sentry-javascript copied to clipboard

fix(profiler): scope require to binding import call

Open JonasBa opened this issue 1 year ago • 3 comments

Dont override global require, as it causes issues with our esm/cjs runtime detection and instead scope it to binding import call

Fixes: https://github.com/getsentry/sentry-javascript/issues/13662

JonasBa avatar Sep 30 '24 16:09 JonasBa

This needs a regression test

I'm going to do some testing first to see if this is even true, opened it thinking we have tests for isCJS and it would fail or pass, but doesn't look like we do.

JonasBa avatar Oct 02 '24 14:10 JonasBa

size-limit report 📦

Path Size % Change Change
@sentry/browser 22.73 KB - -
@sentry/browser - with treeshaking flags 21.53 KB - -
@sentry/browser (incl. Tracing) 35.12 KB - -
@sentry/browser (incl. Tracing, Replay) 71.86 KB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.26 KB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 76.21 KB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 89 KB - -
@sentry/browser (incl. Tracing, Replay, Feedback, metrics) 90.82 KB - -
@sentry/browser (incl. metrics) 27 KB - -
@sentry/browser (incl. Feedback) 39.87 KB - -
@sentry/browser (incl. sendFeedback) 27.38 KB - -
@sentry/browser (incl. FeedbackAsync) 32.17 KB - -
@sentry/react 25.49 KB - -
@sentry/react (incl. Tracing) 38.09 KB - -
@sentry/vue 26.91 KB - -
@sentry/vue (incl. Tracing) 37.02 KB - -
@sentry/svelte 22.87 KB - -
CDN Bundle 24.11 KB - -
CDN Bundle (incl. Tracing) 36.96 KB - -
CDN Bundle (incl. Tracing, Replay) 71.65 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 76.99 KB - -
CDN Bundle - uncompressed 70.7 KB - -
CDN Bundle (incl. Tracing) - uncompressed 109.73 KB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 222.24 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 235.46 KB - -
@sentry/nextjs (client) 38.06 KB - -
@sentry/sveltekit (client) 35.74 KB - -
@sentry/node 125.15 KB - -
@sentry/node - without tracing 94.25 KB - -
@sentry/aws-serverless 103.81 KB - -

View base workflow run

github-actions[bot] avatar Oct 03 '24 21:10 github-actions[bot]

This breaks bundlers 😭

JonasBa avatar Oct 07 '24 21:10 JonasBa

@JonasBa is this still relevant or should we close this?

mydea avatar May 20 '25 08:05 mydea

Not relevant anymore.

JonasBa avatar May 20 '25 15:05 JonasBa