Repository navigation
Conversation
`includeWebReplay` and `includeWebFeedback` defaulted to `true`, and the Metro resolvers were only installed when the option was explicitly `false`. The resolver's `undefined` branch, which removes these packages on Android and iOS only, could never run, even though the 5.32.0 changelog announced Web Replay removal from native bundles by default. Install both resolvers unless the option is `true`: - `undefined` (default): removed on Android and iOS, kept on web - `true`: kept on all platforms - `false`: removed on all platforms Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
huextrat
marked this pull request as ready for review
November 18, 2026 10:35
huextrat
requested review from
alwx,
antonis and
lucas-zimerman
as code owners
November 18, 2026 10:35
1 of 6 tasks
antonis
reviewed
Nov 18, 2026
antonis
left a comment
Contributor
There was a problem hiding this comment.
Thank you for your contribution @huextrat 🙇
Overall the PR and the changed behavior LGTM 🚀
I'll loop in @lucas-zimerman for a final check since he has more context on the original implementation and the follow up 🙏
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📢 Type of change
📜 Description
withSentryConfigandgetSentryExpoConfigonly installed the web Replay and Feedback resolvers whenincludeWebReplay/includeWebFeedbackwas explicitlyfalse, andwithSentryConfigdefaulted both options totrue.buildSentryPackageExcludeResolveralready has a branch that removes these packages on Android and iOS only when the option isundefined:Because of the
=== falseguard, that branch could never run, so every native bundle shipped@sentry-internal/replay,@sentry-internal/replay-canvasand@sentry-internal/feedbackunless the app opted out by hand.This PR installs both resolvers unless the option is
true:undefined(new default)truefalseThe JSDoc of both options now describes these three cases.
includeWebFeedbackdoes not affect the React Native feedback widget (feedbackIntegration), which does not import@sentry/browserfeedback.💡 Motivation and Context
The 5.32.0 changelog (#4006) announced that Web Replay is excluded from native bundles by default, with
includeWebReplay: trueto keep it. A late commit in that PR ("set default to true") added thetruedefault and the=== falseguard, so the announced behaviour never shipped. #3718 asked for the same thing: remove web replay on mobile automatically, with an option to also remove it on web.These packages never run on native:
browserReplayIntegrationreturns a no-op whennotWeb(), and Metro does not tree-shake, so the code is bundled and parsed at startup for nothing. In our production app, setting both options tofalseremoves about 295 KB of Hermes bytecode.Removing these packages on native is safe:
replayIntegration.feedbackSync/feedbackAsyncwrappers in@sentry/browserare stubbed too, which is the fix from fix(core): Fix includeWebFeedback crash by stubbing browser wrapper modules #6150 for the startup crash reported in Docs example for includeWebFeedback/includeWebReplay crashes at startup #6149.withSentryExcludeServerOnlyResolveris already installed unconditionally and uses the same fallback.The only change in behaviour is for an app that imports
@sentry/browserReplay or Feedback directly and runs it on Android or iOS, which does not work today anyway. Such an app can set the option totrue.💚 How did you test it?
withSentryConfigandgetSentryExpoConfigand check the default,trueandfalsecases for@sentry-internal/replay,@sentry-internal/feedbackand the@sentry/browserfeedback wrappers. These tests fail without the fix.jest --config jest.config.tools.js: 385 tests pass.lint:oxlint,lint:fmt,build:sdkandapi-report:checkpass (the API report does not change).getSentryExpoConfig) has run withincludeWebReplay: falseandincludeWebFeedback: falseon Android and iOS without issues.I did not run
test:sdk,circularDepCheck, or a sample app bundle with this branch.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
🤖 Generated with Claude Code