rollup-plugin-dotenv
JSON →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.
Traffic · last 30 days ↓92% vs prev 7d
total hits 22
actors 6 distinct systems
last hit 6d ago human
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇬🇧 United Kingdom · 🇸🇬 Singapore · 🇫🇷 France
Resources
API endpoints
full doc /v1/registry/rollup-plugin-dotenv