{"id":19377,"library":"babili-webpack-plugin","title":"Babili Webpack Plugin","description":"A webpack plugin for Babili (now babel-minify), a babel-based minifier. The plugin operates on entire chunks/bundles, offering better toplevel scope optimizations compared to using babili as a babel-loader preset. Version 0.1.2 is the last under the babili name; it was renamed to babel-minify-webpack-plugin starting from v0.2.0. This package is deprecated; users should migrate to babel-minify-webpack-plugin or use TerserPlugin for webpack. Supports options like test, comments, sourceMap, parserOpts, and custom babel/babili instances.","status":"deprecated","version":"0.1.2","language":"javascript","source_language":"en","source_url":"https://github.com/webpack-contrib/babili-webpack-plugin","tags":["javascript","webpack","webpack-plugin","babel","babili","minify"],"install":[{"cmd":"npm install babili-webpack-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add babili-webpack-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add babili-webpack-plugin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Webpack plugin interface; requires webpack to function","package":"webpack","optional":false}],"imports":[{"note":"CommonJS only; no default ESM export. Use require() or migrate to babel-minify-webpack-plugin for ESM support.","wrong":"import BabiliPlugin from 'babili-webpack-plugin';","symbol":"BabiliPlugin","correct":"const BabiliPlugin = require('babili-webpack-plugin');"},{"note":"Some webpack plugins expose a default export; if using ES6 import, try this pattern.","wrong":"","symbol":"BabiliPlugin","correct":"const BabiliPlugin = require('babili-webpack-plugin').default;"}],"quickstart":{"code":"const BabiliPlugin = require('babili-webpack-plugin');\n\nmodule.exports = {\n  entry: './src/index.js',\n  output: { filename: 'bundle.js' },\n  plugins: [\n    new BabiliPlugin({}, {\n      comments: false,\n      sourceMap: false\n    })\n  ]\n};","lang":"javascript","description":"Basic webpack configuration using BabiliPlugin to minify the output bundle, disabling comments and source maps."},"warnings":[{"fix":"npm uninstall babili-webpack-plugin && npm install --save-dev babel-minify-webpack-plugin","message":"Package renamed to babel-minify-webpack-plugin. Install babel-minify-webpack-plugin instead.","severity":"deprecated","affected_versions":">=0.2.0"},{"fix":"Pass babili preset options as first argument and overrides (test, comments, etc.) as second argument.","message":"API changed from new BabiliPlugin(options) to new BabiliPlugin(babiliOptions, overrides) in v0.0.9.","severity":"breaking","affected_versions":">=0.0.9"},{"fix":"Upgrade to webpack >= 4 or stick to earlier version of this plugin.","message":"Drop support for webpack < 4 in later versions? Check documentation for compatibility.","severity":"breaking","affected_versions":">=0.3.0"},{"fix":"Avoid using babili as a preset in babel-loader if you use this plugin; let the plugin handle minification.","message":"If used with babel-loader and babili preset, the plugin might double-apply minification.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"npm install babili-webpack-plugin --save-dev","cause":"Package not installed or wrong package name.","error":"Module not found: Error: Can't resolve 'babili-webpack-plugin'"},{"fix":"Use const BabiliPlugin = require('babili-webpack-plugin');","cause":"Incorrect import style; the plugin is CommonJS and requires require().","error":"BabiliPlugin is not a constructor"},{"fix":"Instantiate with new BabiliPlugin(babiliOptions, overrides) where babiliOptions is the first argument.","cause":"Old API from v0.0.8 or earlier; options structure changed.","error":"TypeError: BabiliPlugin is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}