This codemod removes the import statement for the @sentry/replay package and replaces instances of new Replay() with Sentry.replayIntegration(), aligning with the latest Sentry SDK practices.
- Import Removal: Eliminates the import statement for Replay from the @sentry/replay package.
- Integration Replacement: Transforms all occurrences of new Replay() into Sentry.replayIntegration() to ensure compatibility with the latest Sentry SDK.
Example
Before
ts
After
ts
,
Before
ts
After
ts
,
Before
ts
After
ts