A webpack plugin that uses babel-minify (formerly babili) to minify JavaScript bundles. Current stable version is 0.3.1, released March 2018. Last release was a bugfix for webpack 4 tapable deprecation warnings. The plugin operates on entire chunks rather than individual files, enabling optimizations not possible with loader-based minification. However, it is slower than using babel-loader with the minify preset. The package has narrow engine requirements (Node 4.3–5.0 or >=5.10) and is essentially in maintenance mode, with no releases since 2018 and webpack 5 not officially supported. Alternatives include terser-webpack-plugin and babel-loader with preset-minify.
npm install babel-minify-webpack-pluginVerified import paths — ran on the pinned version, not inferred.
Webpack 4 configuration with babel-minify-webpack-plugin, including minify and plugin options.
Update constructor to `new BabiliPlugin(babiliOptions, overrides)` or use v0.3.1 (named babel-minify-webpack-plugin) with `new MinifyPlugin(minifyOpts, pluginOpts)`.
Install babel-minify-webpack-plugin instead of babili-webpack-plugin.
Use Node >= 4.3 < 5.0 or >= 5.10 (e.g., Node 6+).
Use terser-webpack-plugin for webpack 5, or test with this plugin but expect issues.
Use babel-loader with `presets: ['minify']` and enable `mangle.topLevel` if needed.
Run `npm install babel-minify-webpack-plugin --save-dev` and use correct import.
Use `const MinifyPlugin = require('babel-minify-webpack-plugin');` instead of `import MinifyPlugin from '...'`.Ensure the plugin is instantiated with `new MinifyPlugin(...)` inside the `plugins` array.