0.2.0 • Published 9 days ago
vite-plugin-valibot-env v0.2.0
vite-plugin-valibot-env
A Vite plugin to validate environment variables against a Valibot schema
Installation
npm install -D vite-plugin-valibot-env
Usage
import { defineConfig } from 'vite';
import * as v from 'valibot';
import valibot from 'vite-plugin-valibot-env';
const envSchema = v.object({
NODE_ENV: v.union([
v.literal('development'),
v.literal('staging'),
v.literal('production'),
])
});
export default defineConfig({
plugins: [
valibot(envSchema)
]
});
License
This work is licensed under The MIT License