diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a55ffeb1979..53e8740a6cbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - feat(replay): Send client_report when replay sending fails (#7093) - fix(node): `LocalVariables`, Improve frame matching for ESM (#7049) - fix(node): Add lru cache to http integration span map (#7064) +- fix(replay): Export Replay from Sentry namespace in full CDN bundle (#7119) Work in this release contributed by @JamesHenry. Thank you for your contribution! diff --git a/packages/tracing/src/index.bundle.replay.ts b/packages/tracing/src/index.bundle.replay.ts index b70b443ef682..403cc6342b65 100644 --- a/packages/tracing/src/index.bundle.replay.ts +++ b/packages/tracing/src/index.bundle.replay.ts @@ -2,6 +2,11 @@ import { Replay } from '@sentry/browser'; import * as Sentry from './index.bundle'; +// TODO (v8): Remove this as it was only needed for backwards compatibility +// We want replay to be available under Sentry.Replay, to be consistent +// with the NPM package version. Sentry.Integrations.Replay = Replay; -export default Sentry; +export { Replay }; + +export * from './index.bundle'; diff --git a/packages/tracing/test/index.bundle.replay.test.ts b/packages/tracing/test/index.bundle.replay.test.ts index 7a55d4c6741e..6de5a19d1f61 100644 --- a/packages/tracing/test/index.bundle.replay.test.ts +++ b/packages/tracing/test/index.bundle.replay.test.ts @@ -1,4 +1,4 @@ -import Sentry from '../src/index.bundle.replay'; +import * as Sentry from '../src/index.bundle.replay'; // Because of the way how we re-export stuff for the replay bundle, we only have a single default export const { Integrations } = Sentry; @@ -15,5 +15,6 @@ describe('Integrations export', () => { }); expect(Integrations.Replay).toBeDefined(); + expect(Sentry.Replay).toBeDefined(); }); });