rollup-plugin-inject is a Rollup plugin providing a simple way to inject variables or modules into your JavaScript bundles. It replaces identifiers in your code with specified values or requires. This is particularly useful for polyfilling environment-specific variables like process.env.NODE_ENV or providing mock implementations during testing. Configuration is straightforward, allowing you to easily define what should be injected and where. Offers a concise solution for dependency injection and conditional compilation within Rollup.
Rollup-plugin-inject's release frequency is sporadic. Initial development occurred in 2015-2016. There were no releases between October 2019 and July 2025; no releases have occurred this year. Most releases are single version updates per month. Overall, release activity has significantly decreased since 2019.
Rollup-plugin-inject downloads show a general upward trend from March to November 2024, peaking at over 4 million. December 2024 saw a dip, followed by a surge in early 2025. Since March 2025, downloads have been gradually decreasing through August, with August's count being incomplete.