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

Bundle size for Replay #11894

Open
3 tasks done
luin opened this issue May 4, 2024 · 1 comment
Open
3 tasks done

Bundle size for Replay #11894

luin opened this issue May 4, 2024 · 1 comment

Comments

@luin
Copy link
Contributor

luin commented May 4, 2024

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/react

SDK Version

7.113.0

Framework Version

7.113.0

Link to Sentry event

No response

SDK Setup

No response

Steps to Reproduce

Expected Result

Non-used bundles don't appear in the final bundle

Actual Result

It includes Feedback and Replay Canvas:

node_modules/@sentry-internal/feedback/esm/index.js 46.00 kb
node_modules/@sentry-internal/replay-canvas/esm/index.js 25.99 kb

It also includes code for tracing but I assume that could be shaken as documented here: https://docs.sentry.io/platforms/javascript/configuration/tree-shaking/. However, Feedback and Replay Canvas (we only record DOM) are two large modules that I haven't found a way to remove from the final build.

@mydea
Copy link
Member

mydea commented May 6, 2024

Hey, so replay-canvas should def. be tree shaken away by default. Can you clarify, is this actually included in the bundle that is built, or just logged out? The same is true for feedback - yes, this is exported from the @sentry/react package, but unless you import it it should not be included in your actual application bundle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Community
Development

No branches or pull requests

2 participants