Registry / devops / rollup-plugin-esbuild-minify

rollup-plugin-esbuild-minify

JSON →
library1.3.0jsnpmunverified

Rollup plugin that minifies or cleans up generated bundles using esbuild. Current stable version 1.3.0 (April 2025), with an active release cadence supporting Rollup 2, 3, and 4. It is simpler than rollup-plugin-esbuild as it focuses solely on minification of bundled JavaScript output, and is faster than @rollup/plugin-terser. Supports configurable log level, log limit, legal comment handling, and a minify toggle to pretty-print instead. Requires Node.js 14.18+ and Rollup ^2 || ^3 || ^4 as a peer dependency.

npm install rollup-plugin-esbuild-minify
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-ESBU
R
rollup-plugin-esbuild-minify
devopsjavascriptv1.3.0
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
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 18–223 runs
build_error
glibc
node 18–223 runs
build_error
Code
Verified usage

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

minify
✓ import { minify } from 'rollup-plugin-esbuild-minify'
✗ const minify = require('rollup-plugin-esbuild-minify')
ESM-only since v1.0.0; CommonJS require() will fail unless using a bundler that interops.

Basic Rollup configuration using the minify plugin with options for logging and legal comments.

import { minify } from 'rollup-plugin-esbuild-minify'; export default { input: 'src/index.js', output: { file: 'dist/bundle.js', format: 'iife', sourcemap: true }, plugins: [ minify({ logLevel: 'warning', logLimit: 10, legalComments: 'none', minify: true }) ] };
Debug
Known issues
gotchaSetting minify to false will pretty-print the code, not leave it untouched. This can cause unexpected transformations if you only want to disable minification.
fix
To disable minification entirely, set minify: false, but be aware that esbuild still reformats the code.
affects: >=1.1.0
deprecatedRollup v2 support deprecated since v1.1.1; v1.1.2 added exports field, but Rollup 2 still works.
fix
Upgrade to v1.2.0+ or keep using v1.1.x if stuck on Rollup 2.
affects: >=1.1.1 <1.2.0
breakingv1.1.1 dropped support for Rollup <2; v1.1.2 added exports field that may break CJS bundlers that don't understand exports.
fix
Use a bundler that supports the exports field, or stay on v1.1.0.
affects: >=1.1.1
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module ... from ... not supported.
Using CommonJS require() to import an ESM-only package.
fix
Use import syntax: import { minify } from 'rollup-plugin-esbuild-minify'
TypeError: Cannot read properties of undefined (reading 'esbuild')
The plugin expects esbuild to be installed as a peer dependency, but it's missing.
fix
Install esbuild: npm install esbuild
Upgrade
Version history
1.3.0latest on npm
Audit
Dependencies
rolluprequiredPeer dependency; the plugin hooks into Rollup's build pipeline.
Agent activity
8 hits · last 30 days
node
6
Resources
rollup-plugin-esbuild-minify — npm install rollup-plugin-esbuild-minify · libregistry