Rollup plugin that minifies ES bundles using the tdewolff minifier, a fast Go-based minifier with JavaScript bindings. Current stable version is 3.0.0. It wraps the @tdewolff/minify package and supports Rollup v2–v4. The plugin runs minification in a thread pool for performance, with optional control over thread count. It offers a function call interface with no required options. Requires Node >=20 and the peer dependencies @tdewolff/minify and rollup. Note that this is a hybrid ESM/CJS package.
npm install rollup-plugin-tdewolff-minifyNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic Rollup configuration using the plugin with default options to minify an ESM bundle.
Upgrade Node to version 20 or later.
Use import syntax or switch to dynamic import() if needed.
Rely on automatic thread pool sizing unless performance tuning requires explicit values.
Configure via { options: { ... } } not top-level.Run npm install --save-dev rollup-plugin-tdewolff-minify @tdewolff/minify.
Change to import statement: import minify from 'rollup-plugin-tdewolff-minify'
Use default import: import minify from 'rollup-plugin-tdewolff-minify'
Install the peer dependency: npm install --save-dev @tdewolff/minify
Change to default import: import minify from 'rollup-plugin-tdewolff-minify'