-
-
Notifications
You must be signed in to change notification settings - Fork 119
Open
Description
Some bundlers have stricter treeshaking requirements than others, and Webpack (and Turbopack) used by Next.js don't seem to be able to treeshake Zod imports unless they're formatted like import * as z from 'zod'.
See this comment for more details: colinhacks/zod#4433 (comment)
Using a bundle analyser, I can see that Next.js projects using t3-env also include all of the zod locales because the imports are currently formatted like import { z } from 'zod'. I propose updating these imports to allow more bundlers to treeshake correctly.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels