{
  "name": "vite-plugin-dotenv",
  "version": "0.1.15",
  "description": "Inject your environment variables from the .env file at runtime instead of build time.",
  "license": "MIT",
  "author": "Ernest",
  "bin": {
    "vite-plugin-dotenv": "bin/vite-plugin-dotenv.js"
  },
  "files": [
    "bin",
    "dist"
  ],
  "main": "dist/index.js",
  "types": "dist/index.d.ts",
  "engines": {
    "node": "^12.20.0 || >= 14"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/iendeavor/vite-plugin-dotenv.git",
    "directory": "packages/vite-plugin-dotenv"
  },
  "bugs": {
    "url": "https://github.com/iendeavor/vite-plugin-dotenv/issues"
  },
  "homepage": "https://github.com/iendeavor/vite-plugin-dotenv/tree/main/packages/vite-plugin-dotenv#readme",
  "devDependencies": {
    "@babel/core": "^7.17.5",
    "@babel/preset-env": "^7.16.11",
    "@babel/preset-typescript": "^7.16.7",
    "@types/glob": "^7.2.0",
    "@types/jest": "^27.4.0",
    "@types/node": "^17.0.8",
    "@types/object-hash": "^2.2.1",
    "@types/tmp": "^0.2.3",
    "babel-jest": "^27.5.1",
    "dotenv": "^11.0.0 || ^12.0.4 || ^13.0.1 || ^14.3.2 || ^15.0.1 || ^16.0.0",
    "esbuild": "^0.14.11",
    "jest": "^27.5.1",
    "rimraf": "^3.0.2",
    "standard-version": "^9.3.2",
    "tmp": "^0.2.1",
    "typescript": "^4.5.4",
    "vite": "^2.7.13"
  },
  "peerDependencies": {
    "dotenv": "^11.0.0 || ^12.0.4 || ^13.0.1 || ^14.3.2 || ^15.0.1 || ^16.0.0",
    "vite": "^2.7.13"
  },
  "peerDependenciesMeta": {
    "vite": {
      "optional": true
    }
  },
  "dependencies": {
    "commander": "^9.0.0",
    "glob": "^7.2.0",
    "object-hash": "^3.0.0",
    "picocolors": "^1.0.0"
  },
  "scripts": {
    "build": "rimraf dist bin && pnpm build-types && pnpm build-bundle && pnpm build-cli",
    "build-bundle": "esbuild src/index.ts --bundle --platform=node --target=node12 --external:vite --external:dotenv --outfile=dist/index.js",
    "build-cli": "esbuild src/cli.ts --bundle --platform=node --target=node12 --external:dotenv --outfile=bin/vite-plugin-dotenv.js",
    "build-types": "tsc -p . --emitDeclarationOnly --outDir dist",
    "release": "standard-version",
    "test": "jest"
  },
  "readme": "# vite-plugin-dotenv\n\n[![CI](https://github.com/iendeavor/vite-plugin-dotenv/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/iendeavor/vite-plugin-dotenv/actions/workflows/ci.yml)\n[![NPM version](https://img.shields.io/npm/v/vite-plugin-dotenv.svg)](https://www.npmjs.com/package/vite-plugin-dotenv)\n[![PRs Welcome](https://img.shields.io/badge/PRs-Welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n\nThis plugin loads environment variables from `.env` files and environment variables on the machine into `import.meta.env` (see `import.meta` on [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import.meta) for more information).\n\nFollowing [the Twelve-Factor App](https://12factor.net/config) approach, storing configuration in the environment separate from code allows us to inject environment variables at runtime rather than build time. Powered by [dotenv](https://github.com/motdotla/dotenv).\n\nThis project use [SemVer](https://semver.org/) for versioning. For the versions available, see the tags on this repository.\n\n## 💡 How\n\nFor security reasons, this plugin will only load those environment variables defined in the `.env.example` file.\n\nFor dev server, this plugin will load environment variables from a `.env` file, and the environment variables on your machine into `import.meta.env`.\n\nFor bundling, this plugin will generate a chunk with placeholder that allow us to inject environment variables later. Before serving your application in production, run the `vite-plugin-dotenv` command to inject environment variables.\n\nNote: vite [built-in variables](https://vitejs.dev/guide/env-and-mode.html#env-variables) will work as usual.\n\n## 🚀 Quick Start\n\nInstall and register the plugin:\n\n```sh\n$ npm i vite-plugin-dotenv dotenv\n```\n\n```ts\n// vite.cofnig.ts\nimport { defineConfig } from \"vite\";\nimport dotenv from \"vite-plugin-dotenv\";\n\nexport default defineConfig({\n  plugins: [dotenv()],\n});\n```\n\nCreate a `.env` and `.env.example` files in the root of your project:\n\n```sh\n# .env\nS3_BUCKET=\"YOURS3BUCKET\"\nSECRET_KEY=\"YOURSECRETKEYGOESHERE\"\n```\n\n```sh\n# .env.example\nS3_BUCKET=\n```\n\nFinally, remember to inject environment variables before serving your application.\n\nAdjust the preview script in your package.json:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"preview\": \"vite-plugin-dotenv && vite preview\"\n  }\n}\n```\n\nYou can use [pkg](https://github.com/vercel/pkg) to create a standalone executable for deployment.\n\nFor example, you can pack the alpine version like this:\n\n```sh\n$ npm i -g pkg\n$ npx pkg ./node_modules/vite-plugin-dotenv/bin/vite-plugin-dotenv.js -t node16-alpine\n```\n\nSee all available targets [here](https://github.com/vercel/pkg#targets)\n\n## 📖 API\n\n### vite-plugin-dotenv binary\n\n```sh\n$ npx vite-plugin-dotenv --help\n```\n\n## 🤝 Contributing\n\nPlease read [CONTRIBUTING.md](./CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull\nrequests to us.\n\n## 📝 License\n\nThis project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details\n"
}