v4/classic/external.js line 12 does export * as locales from "../locales/index.js", which forces webpack/rollup to include all 39 locale files (~175KB parsed) even when only en is used. In v3 this wasn't an issue because locales weren't shipped. Suggest either:
- Make locales opt-in via separate entry points (import ar from "zod/v4/locales/ar")
- Remove the barrel re-export from the default entry
- Use a side-effect-free marker + individual exports so bundlers can tree-shake
v4/classic/external.js line 12 does export * as locales from "../locales/index.js", which forces webpack/rollup to include all 39 locale files (~175KB parsed) even when only en is used. In v3 this wasn't an issue because locales weren't shipped. Suggest either: