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

Improved Codesplitting for smaller bundles #540

Open
enex opened this issue Jun 19, 2023 · 1 comment
Open

Improved Codesplitting for smaller bundles #540

enex opened this issue Jun 19, 2023 · 1 comment

Comments

@enex
Copy link

enex commented Jun 19, 2023

I want to use the library in a webapp in the browser. However the bundle size is rather large even thought i do not use jetstream and several of the other APIs. To avoid having to load it an alternative connect could be introduced that does the bare minimum and has the bare minimum of methods. If you then want to use for example jetstream, the api consumer imports it directly and passes it the connection. This is similar to how firebase restructured there API and would allow efficient code splitting and thus more resource efficient usage in the browser. It might also be beneficial to edge functions because the bundle size of the resulting JS can be reduced in many cases.

@aricart
Copy link
Member

aricart commented Jun 20, 2023

Yes, working on that already - the jetstream configuration has been moved to its own directory - unfortunately the API telegraphs some of the options, so waiting for the next major version to separate them.

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

No branches or pull requests

2 participants