ifdef-loader
JSON →Webpack loader that adds conditional compilation directives (`#if`, `#elif`, `#else`, `#endif`) inside JavaScript or TypeScript comments, processed at build time. Current stable version is 2.3.2 (last released on npm), with no fixed release cadence; the project appears to be in maintenance mode with infrequent updates. Key differentiators: directives are written inside triple-slash comments so they don't interfere with normal parsing or linters; supports nested conditions, arbitrary JS expressions, and an uncomment-prefix feature to hide syntactically invalid code in comments. Comparable to `preprocessor-loader` or manual environment-based code stripping.
Traffic · last 30 days ↓20% vs prev 7d
total hits 15
actors 6 distinct systems
last hit 2d ago AhrefsBot
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇮 Finland · 🇩🇪 Germany · 🇮🇹 Italy
API endpoints
full doc /v1/registry/ifdef-loader
compatibility /v1/registry/ifdef-loader/compatibility