#html #compress #minifier #js #css

minify-html-onepass

Alternate version of minify-html

13 releases

0.8.0 Dec 15, 2021
0.7.2 Dec 14, 2021
0.7.0 Nov 12, 2021
0.6.10 Oct 23, 2021
0.6.8 Aug 10, 2021

#47 in Compression

Download history 15/week @ 2022-01-28 8/week @ 2022-02-04 61/week @ 2022-02-11 19/week @ 2022-02-18 14/week @ 2022-02-25 3/week @ 2022-03-04 28/week @ 2022-03-11 62/week @ 2022-03-18 2/week @ 2022-03-25 9/week @ 2022-04-01 9/week @ 2022-04-08 4/week @ 2022-04-15 95/week @ 2022-04-22 138/week @ 2022-04-29 85/week @ 2022-05-06 227/week @ 2022-05-13

545 downloads per month

MIT license

2.5MB
55K 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.

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

~0.6–1.2MB
~24K SLoC