rollup-plugin-invariant
JSON →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.
Traffic · last 30 days ↓67% vs prev 7d
total hits 12
actors 4 distinct systems
last hit 6d ago human
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇷🇺 Russia
Resources
API endpoints
full doc /v1/registry/rollup-plugin-invariant