diff --git a/README.md b/README.md index 5276ea827..b74819827 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ First you create a schema that describes a structured data set. A schema can be ```ts -import * as v from 'valibot'; // 1.2 kB +import * as v from 'valibot'; // 1.24 kB // Create login schema with email and password const LoginSchema = v.object({ diff --git a/library/README.md b/library/README.md index 5276ea827..b74819827 100644 --- a/library/README.md +++ b/library/README.md @@ -29,7 +29,7 @@ First you create a schema that describes a structured data set. A schema can be ```ts -import * as v from 'valibot'; // 1.2 kB +import * as v from 'valibot'; // 1.24 kB // Create login schema with email and password const LoginSchema = v.object({ diff --git a/website/src/routes/guides/(get-started)/comparison/index.mdx b/website/src/routes/guides/(get-started)/comparison/index.mdx index 3b5307455..7eb10dac9 100644 --- a/website/src/routes/guides/(get-started)/comparison/index.mdx +++ b/website/src/routes/guides/(get-started)/comparison/index.mdx @@ -25,7 +25,7 @@ This can make a big difference, especially for client-side validation, as it red {/* prettier-ignore */} ```ts -import * as v from 'valibot'; // 1.07 kB +import * as v from 'valibot'; // 1.19 kB const LoginSchema = v.object({ email: v.pipe( @@ -43,7 +43,7 @@ const LoginSchema = v.object({ ### Comparison with Zod -For example, to validate a simple login form, [Zod](https://zod.dev/) requires [12.9 kB](https://bundlejs.com/?q=zod&treeshake=%5B%7B+object%2Cstring+%7D%5D) whereas I require only [1.07 kB](https://bundlejs.com/?q=valibot&treeshake=%5B%7B+email%2CminLength%2Cobject%2Cstring%2Cpipe+%7D%5D). That's a 92 % reduction in bundle size. This is due to the fact that Zod's functions have several methods with additional functionalities, that cannot be easily removed by current bundlers when they are not executed in your source code. +For example, to validate a simple login form, [Zod](https://zod.dev/) requires [12.9 kB](https://bundlejs.com/?q=zod&treeshake=%5B%7B+object%2Cstring+%7D%5D) whereas I require only [1.19 kB](https://bundlejs.com/?q=valibot&treeshake=%5B%7B+email%2CminLength%2Cobject%2Cstring%2Cpipe+%7D%5D). That's a 92 % reduction in bundle size. This is due to the fact that Zod's functions have several methods with additional functionalities, that cannot be easily removed by current bundlers when they are not executed in your source code. {/* prettier-ignore */} ```ts diff --git a/website/src/routes/guides/(get-started)/introduction/index.mdx b/website/src/routes/guides/(get-started)/introduction/index.mdx index 747309199..c79dedb10 100644 --- a/website/src/routes/guides/(get-started)/introduction/index.mdx +++ b/website/src/routes/guides/(get-started)/introduction/index.mdx @@ -34,7 +34,7 @@ First you create a schema that describes a structured data set. A schema can be {/* prettier-ignore */} ```ts -import * as v from 'valibot'; // 1.2 kB +import * as v from 'valibot'; // 1.24 kB // Create login schema with email and password const LoginSchema = v.object({