Replies: 2 comments 1 reply
-
Zag.js ships the dist and src files (for better debugging experience) hence the perceived size. I’m sure you know that Bundlephobia isn’t a correct measure of bundle size. Can you share a bundle size analyzer result here? If you’re relying on Ark, I recommend using a sub path import instead of importing from the root package. Import { Combobox } from ark-ui/react/combobox |
Beta Was this translation helpful? Give feedback.
-
It's possible that this is not a bug, but just the fact that these libraries are quite hefty. Specifically for the Combobox (but I assume the same for many others), from what I can see:
For the components I'm using (maybe 50-75%), when gzipped, my zag combobox file is around The total gzipped is around 130kB, which is pretty huge (React DOM is around 50kB minified). Not sure what can be done about this but thought I'd leave this for other people wondering. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! At the time of writing, our usage of zag results in about a 400kb increase to our bundle size. The combobox package on its own is only a bit smaller than the entirety of headlessui/react. Are there any plans to decrease the bundle size?
Beta Was this translation helpful? Give feedback.
All reactions