0.1.4 • Published 1 year ago

vite-plugin-env-types v0.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

vite-plugin-env-types

Automatically generate env type

Motivation

Want to automatically get prompted for import.meta.env instead of managing it manually 👉 vitejs.dev/guide/env-and-mode

Usage

install

npm i vite-plugin-env-types -D

config

// vite.config.ts
import { defineConfig } from "vite";
import EnvTypes from "vite-plugin-env-types";

export default defineConfig({
  plugins: [
    EnvTypes({
        dts: './types/.env.d.ts' // Write file location, default to "env.d.ts"
    }),
  ],
});
// tsconfig.json
{
    "include": ["./env.d.ts"] // Ensure that files are scanned
}

License

Made with markthree

Published under MIT License.

0.1.4

1 year ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.1

2 years ago