{"id":22006,"library":"rollup-plugin-esbuild-minify","title":"rollup-plugin-esbuild-minify","description":"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.","status":"active","version":"1.3.0","language":"javascript","source_language":"en","source_url":"https://github.com/prantlf/rollup-plugin-esbuild-minify","tags":["javascript","rollup","plugin","rollup-plugin","minify","esbuild"],"install":[{"cmd":"npm install rollup-plugin-esbuild-minify","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-plugin-esbuild-minify","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-plugin-esbuild-minify","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; the plugin hooks into Rollup's build pipeline.","package":"rollup","optional":false}],"imports":[{"note":"ESM-only since v1.0.0; CommonJS require() will fail unless using a bundler that interops.","wrong":"const minify = require('rollup-plugin-esbuild-minify')","symbol":"minify","correct":"import { minify } from 'rollup-plugin-esbuild-minify'"}],"quickstart":{"code":"import { minify } from 'rollup-plugin-esbuild-minify';\n\nexport default {\n  input: 'src/index.js',\n  output: {\n    file: 'dist/bundle.js',\n    format: 'iife',\n    sourcemap: true\n  },\n  plugins: [\n    minify({\n      logLevel: 'warning',\n      logLimit: 10,\n      legalComments: 'none',\n      minify: true\n    })\n  ]\n};\n","lang":"typescript","description":"Basic Rollup configuration using the minify plugin with options for logging and legal comments."},"warnings":[{"fix":"To disable minification entirely, set minify: false, but be aware that esbuild still reformats the code.","message":"Setting minify to false will pretty-print the code, not leave it untouched. This can cause unexpected transformations if you only want to disable minification.","severity":"gotcha","affected_versions":">=1.1.0"},{"fix":"Upgrade to v1.2.0+ or keep using v1.1.x if stuck on Rollup 2.","message":"Rollup v2 support deprecated since v1.1.1; v1.1.2 added exports field, but Rollup 2 still works.","severity":"deprecated","affected_versions":">=1.1.1 <1.2.0"},{"fix":"Use a bundler that supports the exports field, or stay on v1.1.0.","message":"v1.1.1 dropped support for Rollup <2; v1.1.2 added exports field that may break CJS bundlers that don't understand exports.","severity":"breaking","affected_versions":">=1.1.1"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use import syntax: import { minify } from 'rollup-plugin-esbuild-minify'","cause":"Using CommonJS require() to import an ESM-only package.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module ... from ... not supported."},{"fix":"Install esbuild: npm install esbuild","cause":"The plugin expects esbuild to be installed as a peer dependency, but it's missing.","error":"TypeError: Cannot read properties of undefined (reading 'esbuild')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}