Skip to content

Commit 982e2eb

Browse files
authored
fix(js): Add note about tree shaking relevance (#10573)
1 parent 708a42c commit 982e2eb

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

docs/platforms/javascript/common/configuration/tree-shaking.mdx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ sentryPlugin({
4242
// other config
4343
bundleSizeOptimizations: {
4444
excludeDebugStatements: true,
45+
// Only relevant if you added `browserTracingIntegration`
4546
excludePerformanceMonitoring: true,
47+
// Only relevant if you added `replayIntegration`
4648
excludeReplayIframe: true,
4749
excludeReplayShadowDom: true,
4850
excludeReplayWorker: true,
@@ -120,20 +122,24 @@ Replacing this flag with `false` will tree shake any SDK code that's related to
120122
`__SENTRY_TRACING__` must not be replaced with `false` when you're using any tracing-related SDK features (for example,`Sentry.startTransaction()`). This flag is intended to be used in combination with packages like `@sentry/next` or `@sentry/sveltekit`, which automatically include the tracing functionality.
121123
</Note>
122124

125+
<PlatformCategorySection supported={['browser']}>
126+
This has no effect if you did not add `browserTracingIntegration`.
127+
</PlatformCategorySection>
128+
123129
<PlatformCategorySection supported={['browser']}>
124130
<PlatformSection notSupported={["javascript.wasm", "javascript.cordova", "javascript.bun", "javascript.deno"]}>
125131

126132
`__RRWEB_EXCLUDE_IFRAME__`
127133

128-
Replacing this flag with `true` will tree shake any SDK code related to capturing iframe content with Session Replay. It's only relevant when using <PlatformLink to="/session-replay">Session Replay</PlatformLink>. Enable this flag if you don't want to record any iframes.
134+
Replacing this flag with `true` will tree shake any SDK code related to capturing iframe content with Session Replay. It's only relevant when using <PlatformLink to="/session-replay">Session Replay</PlatformLink>. Enable this flag if you don't want to record any iframes. This has no effect if you did not add `replayIntegration`.
129135

130136
`__RRWEB_EXCLUDE_SHADOW_DOM__`
131137

132-
Replacing this flag with `true` will tree shake any SDK code related to capturing shadow dom elements with Session Replay. It's only relevant when using <PlatformLink to="/session-replay">Session Replay</PlatformLink>. Enable this flag if you don't want to record any shadow dom elements.
138+
Replacing this flag with `true` will tree shake any SDK code related to capturing shadow dom elements with Session Replay. It's only relevant when using <PlatformLink to="/session-replay">Session Replay</PlatformLink>. Enable this flag if you don't want to record any shadow dom elements. This has no effect if you did not add `replayIntegration`.
133139

134140
`__SENTRY_EXCLUDE_REPLAY_WORKER__`
135141

136-
Replacing this flag with `true` will tree shake any SDK code that's related to the included compression web worker for Session Replay. It's only relevant when using <PlatformLink to="/session-replay">Session Replay</PlatformLink>. Enable this flag if you want to host a compression worker yourself. See <PlatformLink to="/session-replay/configuration/#using-a-custom-compression-worker">Using a Custom Compression Worker</PlatformLink> for details. **We don't recommend enabling this flag unless you provide a custom worker URL.**
142+
Replacing this flag with `true` will tree shake any SDK code that's related to the included compression web worker for Session Replay. It's only relevant when using <PlatformLink to="/session-replay">Session Replay</PlatformLink>. Enable this flag if you want to host a compression worker yourself. See <PlatformLink to="/session-replay/configuration/#using-a-custom-compression-worker">Using a Custom Compression Worker</PlatformLink> for details. **We don't recommend enabling this flag unless you provide a custom worker URL.** This has no effect if you did not add `replayIntegration`.
137143

138144
</PlatformSection>
139145
</PlatformCategorySection>

0 commit comments

Comments
 (0)