39 releases (9 breaking)

0.15.0 Dec 24, 2023
0.13.3 Dec 24, 2023
0.11.1 May 7, 2023
0.10.8 Jan 31, 2023
0.7.0 Nov 12, 2021

#8 in #minify-html

Download history 115/week @ 2024-09-08 150/week @ 2024-09-15 279/week @ 2024-09-22 248/week @ 2024-09-29 64/week @ 2024-10-06 200/week @ 2024-10-13 159/week @ 2024-10-20 165/week @ 2024-10-27 121/week @ 2024-11-03 91/week @ 2024-11-10 70/week @ 2024-11-17 280/week @ 2024-11-24 115/week @ 2024-12-01 216/week @ 2024-12-08 160/week @ 2024-12-15 45/week @ 2024-12-22

562 downloads per month
Used in 9 crates (4 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
~218K SLoC