rollup-plugin-invariant

JSON →
library 0.9.2 ·javascript
verified Apr 27, 2026

Rollup plugin that strips invariant(condition, message) calls in production builds. v0.9.2 (stable, infrequent releases). It transforms invariant calls into empty statements when process.env.NODE_ENV is 'production', removing both the condition evaluation and message string. Unlike general dead-code elimination, this plugin specifically targets the invariant pattern without relying on Terser or manual tree-shaking, ensuring zero runtime overhead in production. Works with rollup >=1.0 and ships TypeScript types.

total hits 12
actors 4 distinct systems
last hit 6d ago human
GPTBot
5
ClaudeBot
1
Search engines
1
Humans
2

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇷🇺 Russia