0.2.2 • Published 8 months ago

unplugin-typedotenv v0.2.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
8 months ago

unplugin-typedotenv

typedotenv with unplugin.

You can generate TypeScript code from .env file. When you edit the .env file, the file is re-created.

read more

Setup

npm install --save-dev unplugin-typedotenv
// vite.config.ts
import typedotenv from 'unplugin-typedotenv/vite'
export default defineConfig({
  plugins: [typedotenv({ output: 'src/env.ts' })],
})

// rollup.config.js
import typedotenv from 'unplugin-typedotenv/rollup'
export default {
  plugins: [typedotenv({ output: 'src/env.ts' })],
}

// esbuild.config.js
import { build } from 'esbuild'
build({
  plugins: [require('unplugin-typedotenv/esbuild')({ output: 'src/env.ts' })],
})

// webpack.config.js
module.exports = {
  /* ... */
  plugins: [require('unplugin-typedotenv/webpack')({ output: 'src/env.ts' })],
}

0.2.2

8 months ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago