A Node.js module minifier that leverages Webpack and Terser to optimize JavaScript packages. Version 1.0.5 is the current stable release, with no recent updates or clear release cadence. It ships TypeScript declarations, making it suitable for both JavaScript and TypeScript projects. Differentiators include a simple API that integrates Webpack and Terser without requiring complex configuration, though it may lack the granularity of using those tools directly.
npm install module-minifierNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage: reading a file, minifying with the default options, and writing the result. The package exports a `minify` function that returns a promise.
Use namespace import (`import * as minifier`) or use require().
Pin version to 1.0.x and monitor changelog.
Refer to Terser documentation for valid options.
Use `import * as minifier` or `const { minify } = require('module-minifier')`.Run `npm install webpack` in your project.
Provide a Terser options object with appropriate `ecma` version or use a different parser.