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

Collab: Move to tree-shakeable component #43

Merged
merged 7 commits into from
Sep 7, 2021
Merged

Collab: Move to tree-shakeable component #43

merged 7 commits into from
Sep 7, 2021

Conversation

mirka
Copy link
Member

@mirka mirka commented Aug 26, 2021

Closes #36

Extracts the useYjs features into a top-level supporting component <CollaborativeEditing> to reduce bundle size when it isn't used. Any bundles consuming iso-editor should go back to their previous sizes, if they don't import the CollaborativeEditing component.

@mirka mirka self-assigned this Aug 26, 2021
@mirka mirka requested a review from johngodley August 27, 2021 21:38
@mirka mirka marked this pull request as ready for review August 27, 2021 21:38
@mirka mirka mentioned this pull request Sep 2, 2021
Copy link
Member

@johngodley johngodley left a comment

Choose a reason for hiding this comment

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

Trying with an external project and 2.3.0 the bundled size is 170kb (uncompressed). With this PR the size is 61kb 🥳

The storybook still works as expected, and overall looks like a great change.

@mirka mirka merged commit ba7d09b into trunk Sep 7, 2021
@mirka mirka deleted the refactor/collab branch September 7, 2021 12:27
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.

Make useYjs tree shakeable
2 participants