-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Package: browserIssues related to the Sentry Browser SDKIssues related to the Sentry Browser SDKPackage: replayIssues related to the Sentry Replay SDKIssues related to the Sentry Replay SDKType: Improvement
Description
Problem Statement
Currently, if we use @sentry/browser
or any similar package, but we don't use any replay feature (for any reason), we want to avoid shipping the whole replay package to our customers.
We use webpack and I setup a specific rule through resolve.alias
configuration to resolve all occurrences of the replay package to null.
resolve: {
alias: {
'@sentry/replay': false
}
}
It works, and doesn't create any error, but it's not really "clean".
Solution Brainstorm
Offer a flag to let bundler choose similar to these https://docs.sentry.io/platforms/javascript/guides/react/configuration/tree-shaking/#list-of-flags
Tag: __SENTRY_REPLAY__
It would be much cleaner than a webpack resolve config.
giomogna
Metadata
Metadata
Assignees
Labels
Package: browserIssues related to the Sentry Browser SDKIssues related to the Sentry Browser SDKPackage: replayIssues related to the Sentry Replay SDKIssues related to the Sentry Replay SDKType: Improvement