{"library":"rollup-plugin-dotenv","title":"rollup-plugin-dotenv","description":"Rollup plugin that loads .env files and replaces process.env references at build time. Current stable version is 0.5.1. Released irregularly, with the last release in 2023. It integrates with @rollup/plugin-replace under the hood for environment variable substitution. Supports multiple .env files with environment-specific overrides (e.g., .env.production.local). Unlike runtime dotenv packages, this plugin performs compile-time replacement, which can improve performance and security. No browser or client-side usage. Only supports CommonJS requires? Note: This plugin does not support dynamic access like process.env[VAR]. Shipping TypeScript types.","language":"javascript","status":"active","last_verified":"Mon Apr 27","install":{"commands":["npm install rollup-plugin-dotenv"],"cli":null},"imports":["import dotenv from 'rollup-plugin-dotenv'","const dotenv = require('rollup-plugin-dotenv')","import type { RollupPluginDotenvOptions } from 'rollup-plugin-dotenv'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// rollup.config.js\nimport dotenv from 'rollup-plugin-dotenv';\n\nexport default {\n  input: 'src/index.js',\n  output: {\n    dir: 'dist',\n    format: 'esm'\n  },\n  plugins: [\n    dotenv({\n      cwd: '.',\n      envKey: 'NODE_ENV'\n    })\n  ]\n};","lang":"javascript","description":"Basic Rollup configuration using rollup-plugin-dotenv to replace process.env references with values from .env files.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}