Babel preset that bundles all babel-minify plugins for minification. Current stable version is 0.5.2 (last release Sep 2018). This project is part of the babel/minify monorepo, which is now in maintenance mode with no active development. The preset provides a convenient way to apply minification transforms like dead code elimination, constant folding, mangle names, and more via a single preset. Unlike terser or uglify, it operates as a Babel transform, allowing integration with Babel workflows and AST-level optimizations. It supports options to enable/disable individual plugins and has known missing dependency issues.
npm install babel-preset-minifyVerified import paths — ran on the pinned version, not inferred.
Demonstrates installation, .babelrc configuration with options, and Node API usage for minifying JavaScript.
Migrate to terser (via @babel/plugin-minify? but prefer standalone) or use babel-plugin-uglify or similar.
Upgrade to 0.5.2 or pin to 0.5.0. Also, ensure all peer dependencies are installed (babel-core 6.x).
Update presets from 'babili' to 'minify' and update package names accordingly.
Use 'exclude' instead of 'blacklist' in mangle options.
Use require() for Node.js. For bundlers, ensure Babel is configured properly.
Run: npm install babel-preset-minify --save-dev
Use "presets": ["minify"] or "presets": [["minify", { options }]]Replace 'blacklist' with 'exclude' in mangle options.
Do not import babel-preset-minify directly in code; use it only in Babel config.
No dependency data recorded yet.