vite-plugin-validate-env icon indicating copy to clipboard operation
vite-plugin-validate-env copied to clipboard

Support valibot

Open BrunnerLivio opened this issue 1 year ago • 1 comments

We're utilising valibot at runtime in our project, since it results in a smaller bundle size. Surely it is possible to use Zod with this Vite plugin and Valibot at runtime, but it'd be amazing if we could use the same schema validator.

BrunnerLivio avatar Sep 13 '24 14:09 BrunnerLivio

Hey, happy to accept a PR for Valibot. It should be pretty easy to add. Feel free to take inspiration from Zod driver :

https://github.com/Julien-R44/vite-plugin-validate-env/blob/main/src/validators/zod/index.ts

Julien-R44 avatar Sep 20 '24 18:09 Julien-R44

As seen in #33, valibot is now supported through standard-schema!

Julien-R44 avatar Jan 21 '25 13:01 Julien-R44