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

Make useYjs tree shakeable #36

Closed
mirka opened this issue Aug 16, 2021 · 0 comments · Fixed by #43
Closed

Make useYjs tree shakeable #36

mirka opened this issue Aug 16, 2021 · 0 comments · Fixed by #43
Assignees
Labels
enhancement New feature or request

Comments

@mirka
Copy link
Member

mirka commented Aug 16, 2021

Yjs adds about 23KB gzipped to the bundle, which goes unused for the majority of consumers who won't use real-time collaboration features.

As suggested in #32 (comment):

Possibly the code could be exported as a component or a hook (useCollaboration( IsolatedBlockEditor, transport ) etc), and then Webpack might be able to tree shake it away.

A child component (like EditorLoaded) might work too.

@mirka mirka added the enhancement New feature or request label Aug 16, 2021
@mirka mirka self-assigned this Aug 26, 2021
@mirka mirka closed this as completed in #43 Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant