Closed as not planned
Description
openedon Oct 26, 2024
Problem Statement
It looks like there is no way to avoid internal @sentry-internal/feedback module that brings 80KB of rendered size in the app. It comes with @sentry/browser which in my setup (react/vite) is used by @sentry/react.
"node_modules/@sentry/browser": {
"version": "8.35.0",
"resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-8.35.0.tgz",
"integrity": "sha512-WHfI+NoZzpCsmIvtr6ChOe7yWPLQyMchPnVhY3Z4UeC70bkYNdKcoj/4XZbX3m0D8+71JAsm0mJ9s9OC3Ue6MQ==",
"license": "MIT",
"dependencies": {
"@sentry-internal/browser-utils": "8.35.0",
**"@sentry-internal/feedback": "8.35.0",**
"@sentry-internal/replay": "8.35.0",
"@sentry-internal/replay-canvas": "8.35.0",
"@sentry/core": "8.35.0",
"@sentry/types": "8.35.0",
"@sentry/utils": "8.35.0"
},
"engines": {
"node": ">=14.18"
}
},
Solution Brainstorm
Two solutions:
1.) Add parameter to bundleSizeOptimizations, similar to excludeTracing and excludeReplayIframe, so I cam remove this dependency.
2.) Support automatic tree shaking, so I can load feedback later with:
const lazyLoadedSentry = await import("@sentry/react");
Sentry.addIntegration(lazyLoadedSentry.feedbackIntegration({
colorScheme: "system",
showBranding: false,
autoInject: false,
}));
const feedback = Sentry.getFeedback();
...
Metadata
Assignees
Type
Projects
Status
Waiting for: Community
Activity