Preparing for system design interviews?  Try bugzed.com →

rollup-plugin-ifdef

JSON →
library 1.1.1 ·javascript
verified Jun 18, 2026

A conditional compilation plugin for Rollup and Vite, allowing you to include or exclude code blocks based on build-time flags or environment variables. Supports JavaScript, TypeScript, CSS, SCSS, Vue, and React files. v1.1.1 is the current stable version, released in 2023 and last updated in 2023. It uses a comment-based syntax (e.g., @ifdef and @ifndef) similar to C preprocessor directives, making it easy to toggle debug code, platform-specific features, or feature flags without modifying the source. Unlike alternatives that rely on environment variable replacement or dead-code elimination, this plugin performs actual code removal at build time, ensuring zero runtime overhead.

total hits 11
actors 5 distinct systems
last hit 25d ago AhrefsBot
GPTBot
4
ClaudeBot
2
Script
1

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · 🇩🇪 Germany