Hyperbuild is a fast, one-pass, allocation-less HTML minifier written in Rust with context-aware whitespace handling. Current stable version 0.2.3 was released in 2020 and targets Node.js 8–14. It outperforms alternatives like html-minifier and minimize by avoiding AST/tree building and heap allocation during processing. Supports JS minification via esbuild integration, and provides CLI, Rust library, and native bindings for Node.js, Python, Java, and Ruby. Has extensive fuzzing and test suites. Note: package is in maintenance mode with no recent updates; Node.js bindings only work with older Node.js versions.
npm install hyperbuildNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Minifies HTML string using Node.js native module with config disabling JS minification.
Consider using a maintained alternative like html-minifier-terser or SWC minifier.
Use Node.js 14 or earlier, or avoid the package.
Always set minifyJs: false unless you have esbuild as a dependency.
Use minify for safe operations on strings.
Install using a Node.js version between 8 and 14, or rebuild the native module from source.
Use require('hyperbuild') and ensure the package is installed; if using bundlers, check that native modules are not bundled.Run npm install hyperbuild --save