4 ms·
One decision that seems dubious to me is the zod/v4-mini import. I suspect that this will actually increase bundle sizes across the ecosystem. The docs specific
by CGamesPlay 1y ago
One decision that seems dubious to me is the zod/v4-mini import. I suspect that this will actually increase bundle sizes across the ecosystem. The docs specifically say "zod/v4 is still recommended for the majority of use cases", so application developers will use it. Library authors will think to themselves, "but I want to enable my library to be used by those with uncommonly strict bundle size requirements", and so will use that. The net result is that both zod/v4 and zod/v4-mini will be included in the application bundle.
I guess this could be mostly avoided if zod/v4 actually a wrapper around zod/v4-mini. Is that the case?
- LinusU 1y agoLibrary authors should only import from `core`, which is used by both v4 and v4-mini. ref: https://zod.dev/library-authors?id=how-to-support-zod-and-zod-mini-simultaneously https://zod.dev/library-authors?id=how-to-support-zod-and-zo...
- CGamesPlay 1y agoGlad to see that this was also considered. I’m curious why they went with a third API, though.