WASM wrapper around the Rust crate minify-html, providing extremely fast HTML + JS + CSS minification. Version 0.1.1 is stable. It leverages WebAssembly for near-native performance and offers a comprehensive set of minification options. Unlike JavaScript-based minifiers, this package runs the Rust minify-html library in the browser or Node.js via WASM, delivering high speed and consistency across environments.
npm install minify-html-wasmNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize the WASM module and minify an HTML string with options.
Ensure await init() is executed before using minify().
Encode strings with TextEncoder and decode with TextDecoder.
Use default init() without URL for Node.js; for browser, bundle the WASM file.
Always provide a complete MinifyOptions object (all fields optional but object must exist).
Split large documents into chunks or use a streaming minifier.
Provide a valid URL to the WASM file or use default init() which expects the WASM to be in the same directory.
Use named import: import { minify } from 'minify-html-wasm' and ensure init() completes.Encode strings with TextEncoder before passing: const input = new TextEncoder().encode(htmlString);
No dependency data recorded yet.