{"library":"babel-plugin-conditional-compile","type":"library","category":null,"description":"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.","language":"javascript","status":"maintenance","version":"0.0.5","tags":["javascript","babel","compile","bebel-plugin"],"last_verified":"Wed May 27","install":[{"cmd":"npm install babel-plugin-conditional-compile","imports":["// No import needed - plugin is specified in Babel config","const babel = require('babel-core');","// Options are passed as second element in plugin array:\nplugins: [['conditional-compile', { define: { IS_DEV: true } }]]"]},{"cmd":"yarn add babel-plugin-conditional-compile","imports":[]},{"cmd":"pnpm add babel-plugin-conditional-compile","imports":[]}],"homepage":null,"github":"https://github.com/brianZeng/babel-plugin-conditional-compile","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/babel-plugin-conditional-compile","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/babel-plugin-conditional-compile/compatibility"}}