An ES6+ aware minifier based on the Babel toolchain, enabling direct minification of modern JavaScript.
babel-minify is a JavaScript minifier built on the Babel toolchain that understands and optimizes ES6+ syntax directly. It solves the problem of minifying modern JavaScript code without requiring an intermediate transpilation step to ES5, which can lead to smaller output sizes for compatible environments.
JavaScript developers using Babel in their build process, particularly those targeting modern browsers or environments with native ES6+ support and seeking optimized bundle sizes.
Developers choose babel-minify for its deep integration with Babel, allowing minification of modern syntax directly, and its modular plugin architecture that offers flexibility within the familiar Babel ecosystem.
:scissors: An ES6+ aware minifier based on the Babel toolchain (beta)
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Minifies modern JavaScript like classes and arrow functions directly without transpiling to ES5, as demonstrated in the README's class example showing smaller output for ES2015+ code.
Available as a Babel preset, CLI tool, or API, making it easy to integrate into existing Babel-based workflows, with usage examples for .babelrc and environment variables.
Composed of individual Babel plugins such as dead code elimination and constant folding, allowing for fine-grained control and customization, as listed in the Individual Plugins section.
Benchmarks show output sizes comparable to Terser and UglifyJS for ES6+ code, with similar gzip wins, though performance times are slower.
The project is explicitly labeled as beta and not recommended for production use, posing a risk for stability and long-term maintenance in critical applications.
Benchmarks indicate significantly longer minify times—often 2-3 times slower than Terser for large files—due to AST-level processing within Babel's toolchain.
Requires Babel >=6.20.0 and node >=6, making it unsuitable for projects not using or wanting to avoid Babel's ecosystem, as noted in the Requirements section.
babel-minify is an open-source alternative to the following products:
UglifyJS is a JavaScript parser, minifier, compressor, and beautifier toolkit that reduces file sizes by removing whitespace, comments, and optimizing code while preserving functionality. It supports ES5 syntax and is widely used in build pipelines.
A JavaScript parser, mangler, and compressor toolkit for ES6+, used to minify JavaScript code for production deployment.