Skip to content

Conversation

@mydea
Copy link
Member

@mydea mydea commented Mar 16, 2023

In order to avoid breaking the bundler when a user opts out of tracing there.

@mydea mydea requested review from AbhiPrasad and Lms24 March 16, 2023 10:33
@mydea mydea self-assigned this Mar 16, 2023
);

const browserIndexFilePath = path.resolve(__dirname, '../../packages/browser/src/index.ts');
const browserIntegrationsIndexFilePath = path.resolve(__dirname, '../../packages/browser/src/integrations/index.ts');
Copy link
Member

Choose a reason for hiding this comment

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

l: Would you mind updating the JSDoc of this function? I think it's pretty outdated by now.

Copy link
Member Author

Choose a reason for hiding this comment

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

actually got rid of this now!

In order to avoid breaking the bundler when a user opts out of tracing there.
@mydea mydea force-pushed the fn/browser-tracing-shim branch from ccc1043 to f71eb69 Compare March 20, 2023 10:53
@mydea
Copy link
Member Author

mydea commented Mar 20, 2023

So I updated this to make this work properly.
I aligned the bundle generation with how this works in tracing, where we simply have a separate entrypoint per bundle.
This way, we do not need to do any rewriting etc. of paths, which streamlines this a bit.
Also it makes it easier to ensure we have the stuff correctly on Sentry. and Sentry.Integrations, for backwards compatibility.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 20, 2023

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 20.54 KB (+0.22% 🔺)
@sentry/browser - ES5 CDN Bundle (minified) 63.88 KB (+0.5% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 19.2 KB (+0.5% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 56.96 KB (+0.58% 🔺)
@sentry/browser - Webpack (gzipped + minified) 21.68 KB (0%)
@sentry/browser - Webpack (minified) 72.17 KB (0%)
@sentry/react - Webpack (gzipped + minified) 21.72 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 52.06 KB (0%)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 33.77 KB (-0.04% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 26.14 KB (-0.01% 🔽)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 44.23 KB (0%)
@sentry/replay - Webpack (gzipped + minified) 38.28 KB (0%)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 62.45 KB (0%)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 56 KB (+0.87% 🔺)

@mydea mydea force-pushed the fn/browser-tracing-shim branch from f71eb69 to 538ae59 Compare March 20, 2023 11:18
Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

I agree, the separate index files look like the cleaner option now!

@mydea mydea merged commit f8b74f0 into develop Mar 20, 2023
@mydea mydea deleted the fn/browser-tracing-shim branch March 20, 2023 13: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.

4 participants