Skip to content
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

fix: move patch function into utils to improve bundling #1631

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pauldambra
Copy link
Contributor

split out of #1594 which I managed to break :/

the current way that patch is bundled means the console recorder plugin includes all of rrweb in order to include patch

image

in the original PR we saw:

move the patch function into the existing @rrweb/utils package fixes this

(I've only proven the bundle is fixed - i'm hoping CI proves the recorder still works 😅 )

just looking at bundle size this reduces the console recorder plugin from 255kb to 15kb

Copy link

changeset-bot bot commented Jan 17, 2025

🦋 Changeset detected

Latest commit: 700dcdd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 19 packages
Name Type
@rrweb/rrweb-plugin-console-record Patch
@rrweb/record Patch
rrweb Patch
@rrweb/utils Patch
rrweb-snapshot Patch
rrdom Patch
rrdom-nodejs Patch
rrweb-player Patch
@rrweb/all Patch
@rrweb/replay Patch
@rrweb/types Patch
@rrweb/packer Patch
@rrweb/web-extension Patch
rrvideo Patch
@rrweb/rrweb-plugin-console-replay Patch
@rrweb/rrweb-plugin-sequential-id-record Patch
@rrweb/rrweb-plugin-sequential-id-replay Patch
@rrweb/rrweb-plugin-canvas-webrtc-record Patch
@rrweb/rrweb-plugin-canvas-webrtc-replay Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pauldambra
Copy link
Contributor Author

cc @Juice10 since you reviewed the original PR I managed to break :)

@pauldambra
Copy link
Contributor Author

in PostHog CI with bundle tracking active this PR gives us

Screenshot 2025-01-20 at 16 59 46

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.

1 participant