Concerns about Effect library bundle size when publishing NPM libraries

Hi! I'm creating some libraries I intend to publish on NPM and am using Effect for them. My concern, or rather, question, is about bundle size. When importing the general Effect and when using Effect.Effect and so forth I get a bundle size of around 500kb, for what is really just around 800 lines of code. Half a megabyte for a NPM library to me seems kind of crazy.

I can get it down by around half if I just import the specific things like Ref, Tag, from their respective namespaces like "effect/Context" and so forth, but 250 or so kb still seems a little crazy to me.

And hence, what is the recommended practice here? Should I just pass effect as the dependency in my library and not bundle it, so it becomes the consumers problem, or do I bundle it and thus achieve dependency-less libraries, but at the cost of a huge bundle size?
Was this page helpful?