0.0.2 • Published 12 months ago

vite-plugin-auto-env v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

vite-plugin-auto-env

Automatically generate env type

Install

#npm
npm i vite-plugin-auto-env -D

#yarn
yarn add vite-plugin-auto-env -D

#pnpm
pnpm add vite-plugin-auto-env -D

Usage

// vite.config.ts
import { defineConfig } from 'vite'
import AutoEnv from 'vite-plugin-auto-env'

export default defineConfig({
  plugins: [
    AutoEnv({
      path: './types/.env.d.ts' // Write file location, default to "env.d.ts"
    }),
  ],
})

Config

// tsconfig.json
{
  "include": ["./env.d.ts"] // Ensure that files are scanned
}

License

MIT License © 2023 Elone Hoo

0.0.2

12 months ago

0.0.1

12 months ago