babel-plugin-conditional-compile

JSON →
library 0.0.5 ·javascript maintenance
verified May 27, 2026

A Babel plugin that performs conditional compilation by evaluating if statements with predefined constants and removing dead code. Version 0.0.5 is the latest stable release, updated infrequently (last release in 2016). It allows developers to define compile-time constants (e.g., IS_DEV, CODE_FOR_IE) and automatically eliminate unreachable branches during bundling, reducing bundle size. Unlike webpack's DefinePlugin or similar tools, this operates at the AST level within Babel transformation pipeline. Supports dropping debugger statements and arbitrary constant replacement. Lacks TypeScript definitions and ES module support; designed for legacy Babel 6.x.

total hits 20
actors 7 distinct systems
last hit 1d ago AhrefsBot
MetaBot
4
ByteDance
3
GPTBot
2
Script
1
Search engines
1
Humans
1

top countries 🇺🇸 United States · 🇩🇪 Germany · 🇸🇬 Singapore · 🇨🇦 Canada