Registry / devops / babili-webpack-plugin

babili-webpack-plugin

JSON →
library0.1.2jsnpmunverified

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.

npm install babili-webpack-plugin
INSTALL
IMPORT
SIG · BABILI-WEBPACK-PLU
B
babili-webpack-plugin
devopsjavascriptv0.1.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

BabiliPlugin
const BabiliPlugin = require('babili-webpack-plugin');
import BabiliPlugin from 'babili-webpack-plugin';
CommonJS only; no default ESM export. Use require() or migrate to babel-minify-webpack-plugin for ESM support.
BabiliPlugin
const BabiliPlugin = require('babili-webpack-plugin').default;
Some webpack plugins expose a default export; if using ES6 import, try this pattern.

Basic webpack configuration using BabiliPlugin to minify the output bundle, disabling comments and source maps.

const BabiliPlugin = require('babili-webpack-plugin'); module.exports = { entry: './src/index.js', output: { filename: 'bundle.js' }, plugins: [ new BabiliPlugin({}, { comments: false, sourceMap: false }) ] };
Debug
Known issues
deprecatedPackage renamed to babel-minify-webpack-plugin. Install babel-minify-webpack-plugin instead.
fix
npm uninstall babili-webpack-plugin && npm install --save-dev babel-minify-webpack-plugin
affects: >=0.2.0
breakingAPI changed from new BabiliPlugin(options) to new BabiliPlugin(babiliOptions, overrides) in v0.0.9.
fix
Pass babili preset options as first argument and overrides (test, comments, etc.) as second argument.
affects: >=0.0.9
breakingDrop support for webpack < 4 in later versions? Check documentation for compatibility.
fix
Upgrade to webpack >= 4 or stick to earlier version of this plugin.
affects: >=0.3.0
gotchaIf used with babel-loader and babili preset, the plugin might double-apply minification.
fix
Avoid using babili as a preset in babel-loader if you use this plugin; let the plugin handle minification.
affects: >=0.0.0
Errors
Common errors & fixes
Module not found: Error: Can't resolve 'babili-webpack-plugin'
Package not installed or wrong package name.
fix
npm install babili-webpack-plugin --save-dev
BabiliPlugin is not a constructor
Incorrect import style; the plugin is CommonJS and requires require().
fix
Use const BabiliPlugin = require('babili-webpack-plugin');
TypeError: BabiliPlugin is not a function
Old API from v0.0.8 or earlier; options structure changed.
fix
Instantiate with new BabiliPlugin(babiliOptions, overrides) where babiliOptions is the first argument.
Upgrade
Version history
0.1.2latest on npm
Audit
Dependencies
webpackrequiredWebpack plugin interface; requires webpack to function
Agent activity
6 hits · last 30 days
node
4
Resources
babili-webpack-plugin — npm install babili-webpack-plugin · libregistry