44 releases

0.16.4 Mar 22, 2025
0.15.0 Dec 24, 2023
0.11.1 May 7, 2023
0.10.8 Jan 31, 2023
0.7.0 Nov 12, 2021

#2187 in Web programming

Download history 121/week @ 2024-12-28 103/week @ 2025-01-04 149/week @ 2025-01-11 121/week @ 2025-01-18 93/week @ 2025-01-25 84/week @ 2025-02-01 253/week @ 2025-02-08 101/week @ 2025-02-15 99/week @ 2025-02-22 82/week @ 2025-03-01 97/week @ 2025-03-08 144/week @ 2025-03-15 672/week @ 2025-03-22 76/week @ 2025-03-29 86/week @ 2025-04-05 77/week @ 2025-04-12

917 downloads per month
Used in 10 crates (5 directly)

MIT license

140KB
3.5K SLoC

minify-html-onepass

An HTML minifier that provides the functionality of minify-html with much more performance, but with stricter parsing and less configurability.

  • Uses the same advanced minification strategy.
  • Minifies in one pass with zero memory allocations.
  • Outputs in place; no copy or buffer required.

Performance

Chart showing speed of HTML minifiers

Usage

The API is different compared to minify-html; refer to per-package documentation for more details.

If you don't see your preferred language here and the main library supports it, raise an issue.

Parsing

In addition to the minify-html rules, the onepass variant has additional requirements:

  • Opening tags must not be omitted.
  • Invalid closing tags are not allowed.
  • The document cannot end unexpectedly.

Dependencies

~15MB
~227K SLoC