Skip to content

fix(session replay): dynamically import plugin-console-record #983

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
May 7, 2025
Merged

Conversation

jxiwang
Copy link
Contributor

@jxiwang jxiwang commented Mar 5, 2025

Summary

Break our rrweb-console-plugin import into a separate chunk.

Screenshot 2025-03-05 at 1 55 29 PM

We are now dynamically importing our Session Replay Plugin in order to prevent the rrweb-console-plugin package from adding ~40KB to our size.

Implications -

  • To take advantage of code-splitting, the main session-replay-browser SDK is now an esm build.
  • A new legacy build for non-esm compatible browsers.

https://amplitude.atlassian.net/browse/SR-983?linkSource=email

https://amplitude.atlassian.net/wiki/spaces/IG/pages/3082682708/Session+Replay+SDK+Bundling

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?:

@jxiwang jxiwang changed the title Sr 104 fix(session replay): dynamically import plugin-console-record Mar 5, 2025
@jxiwang jxiwang marked this pull request as ready for review March 5, 2025 22:07
Copy link
Contributor

@lewgordon-amplitude lewgordon-amplitude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably want to sync with you to better understand if there's any impact to how customers would install this and maybe how it'll fit into all the one line scripts we have.

Copy link
Contributor

@Mercy811 Mercy811 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jxiwang LGTM

@jxiwang jxiwang requested a review from Dogfalo May 7, 2025 18:27
@jxiwang jxiwang merged commit 990def9 into main May 7, 2025
5 checks passed
@jxiwang jxiwang deleted the SR-104 branch May 7, 2025 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants