bit-bundler-minifyjs is a specialized plugin designed to integrate JavaScript minification capabilities into the bit-bundler ecosystem. It acts as a lightweight wrapper around the UglifyJS library, leveraging its robust optimization and minification features. The current stable version is 3.1.0. While no explicit release cadence is stated, the package has seen recent maintenance releases (e.g., v3.0.4), indicating ongoing support for critical fixes. Its primary differentiator is its seamless integration with bit-bundler, allowing developers to configure minification options per bundle, which is particularly useful in code-splitting scenarios. It also provides convenience options like `banner` and `sourceMap` that abstract UglifyJS's underlying configuration, streamlining its usage within the bit-bundler build process.
npm install bit-bundler-minifyjsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to integrate `bit-bundler-minifyjs` into a basic `bit-bundler` setup to minify a JavaScript file.
Do not rely on `bundle.dest` for directly providing file maps to UglifyJS via this plugin. Ensure you are on a version of `bit-bundler` that handles this internally, or adjust your build process to explicitly manage file maps if necessary.
When configuring, check the plugin's README for its specific options (e.g., `banner`, `sourceMap`) before directly referencing UglifyJS options. Understand how the plugin's options map to UglifyJS's underlying configuration.
To extract sourcemaps, install and configure `bit-bundler-extractsm` alongside `bit-bundler-minifyjs` in your `bit-bundler` setup.