Julien-R44 / vite-plugin-validate-env

✅ Vite plugin for validating your environment variables
MIT License
164 stars 6 forks source link

Boolean variable will not parse as the right data type #12

Closed kevbook closed 9 months ago

kevbook commented 1 year ago

The boolean variable will not parse as the right data type. This is because you're setting process.env.VITE_BOOLEAN_VARIABLE = parsed value -- but process.env[key] only accepts strings.

export default defineConfig({
  plugins: [
    ValidateEnv({
      VITE_BOOLEAN_VARIABLE: Schema.boolean(),
    }),
  ],
})
Julien-R44 commented 9 months ago

Hey! Sorry for taking so long. Fixed with 1.0.0

https://github.com/Julien-R44/vite-plugin-validate-env/releases/tag/v1.0.0