vite-plugin-validate-env
vite-plugin-validate-env copied to clipboard
✅ Vite plugin for validating your environment variables
Potentiel fix for #25
I'd like to validate env vars coming from `.env` as well as from the system. System environment: ``` EXPORT SENTRY_AUTH_TOKEN=sensitivevalue ``` `.env`: ``` VITE_APP_VAR=publicvalue ``` `vite.config.ts`: ``` export default defineConfig(({...
Hi, I have try the new feature to add a custom file. The doc indicate `ValidateEnv({ envFile: 'config/env' }` when it is actually `ValidateEnv({ configFile: 'config/env' })`. Plus when the...
I am looking for a way to ONLY allow using env variables that are defined in my `env.ts` schema. As an example: `env.ts` ```typescript import {defineConfig} from '@julr/vite-plugin-validate-env' import {z}...
https://vitest.dev/guide/mocking.html#mock-import-meta-env i found only this solution: ```ts process.env.VITEST ? null : ValidateEnv(), ```
We're utilising [valibot](https://valibot.dev/guides/introduction/) 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...
I want the same environment variable loading and validation to happen in code bundled with Vite for SSR and before running command line tools such as [`kysely-ctl`](https://github.com/kysely-org/kysely-ctl). For the environment...
First of all: Thank you for this awesome package! ---------------- Currently [vite-plugin-validate-env](https://github.com/Julien-R44/vite-plugin-validate-env) only takes a JSON Object as schema instead of an schema Object Type. This makes it hard to...