Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: make zod imports tree-shakeable #2846

Merged
merged 2 commits into from
Dec 23, 2024
Merged

chore: make zod imports tree-shakeable #2846

merged 2 commits into from
Dec 23, 2024

Conversation

MickL
Copy link
Contributor

@MickL MickL commented Dec 6, 2024

The following import is not treeshakable:

import { z } from 'zod'

So I replaced it with

import * as z from 'zod'

Further, because zod is not very treeshakable (Issue: colinhacks/zod#2596) and has a huge bundle size, I replaced its first place position in the docs with Valibot which is fully tree shakable, full type safe and has other benifits as well.

@benjamincanac benjamincanac requested a review from romhml December 6, 2024 15:30
@benjamincanac benjamincanac added the v3 #1289 label Dec 16, 2024
@benjamincanac benjamincanac changed the title v3 docs: Made zod imports treeshakable chore: make zod imports tree-shakeable\ Dec 23, 2024
@benjamincanac benjamincanac changed the title chore: make zod imports tree-shakeable\ chore: make zod imports tree-shakeable Dec 23, 2024
Copy link

pkg-pr-new bot commented Dec 23, 2024

npm i https://pkg.pr.new/@nuxt/ui@2846

commit: b29cebf

@benjamincanac benjamincanac merged commit d617991 into nuxt:v3 Dec 23, 2024
2 checks passed
@benjamincanac
Copy link
Member

Thanks 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3 #1289
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants