Skip to content

Commit 2cf1879

Browse files
committed
don't inject replay addon bundle if complete replay bundle is used
1 parent 5b65a5b commit 2cf1879

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/integration-tests/utils/generatePlugin.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ const useCompiledModule = bundleKey === 'esm' || bundleKey === 'cjs';
1515

1616
// Bundles need to be injected into HTML before Sentry initialization.
1717
const useBundle = bundleKey && !useCompiledModule;
18+
// `true` if we use an SDK bundle that supports Replay ootb,
19+
// without the need to add the additional addon replay integration bundle
20+
const useFullReplayBundle = useBundle && bundleKey.includes('replay');
1821

1922
const BUNDLE_PATHS: Record<string, Record<string, string>> = {
2023
browser: {
@@ -126,7 +129,9 @@ class SentryScenarioGenerationPlugin {
126129
this.requiresTracing = true;
127130
} else if (source === '@sentry/integrations') {
128131
this.requiredIntegrations.push(statement.specifiers[0].imported.name.toLowerCase());
129-
} else if (source === '@sentry/replay') {
132+
} else if (!useFullReplayBundle && source === '@sentry/replay') {
133+
console.log('injecting replay addon bundle');
134+
130135
this.requiresReplay = true;
131136
}
132137
},

0 commit comments

Comments
 (0)