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-minifyVerified import paths — ran on the pinned version, not inferred.
Basic Rollup configuration using the minify plugin with options for logging and legal comments.
To disable minification entirely, set minify: false, but be aware that esbuild still reformats the code.
Upgrade to v1.2.0+ or keep using v1.1.x if stuck on Rollup 2.
Use a bundler that supports the exports field, or stay on v1.1.0.
Use import syntax: import { minify } from 'rollup-plugin-esbuild-minify'Install esbuild: npm install esbuild