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 stale · no recent hits
total hits 11
actors 5 distinct systems
last hit 25d ago AhrefsBot
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇷 France · 🇬🇧 United Kingdom
Resources
API endpoints
full doc /v1/registry/rollup-plugin-invariant
compatibility /v1/registry/rollup-plugin-invariant/compatibility