#html #compress #minifier #js #css

minify-html-onepass

Even faster version of minify-html

26 releases

0.10.8 Jan 31, 2023
0.10.3 Oct 28, 2022
0.9.2 Jun 22, 2022
0.8.0 Dec 15, 2021
0.7.0 Nov 12, 2021

#122 in Compression

Download history 89/week @ 2022-12-05 118/week @ 2022-12-12 213/week @ 2022-12-19 184/week @ 2022-12-26 437/week @ 2023-01-02 335/week @ 2023-01-09 400/week @ 2023-01-16 251/week @ 2023-01-23 430/week @ 2023-01-30 370/week @ 2023-02-06 209/week @ 2023-02-13 180/week @ 2023-02-20 149/week @ 2023-02-27 260/week @ 2023-03-06 114/week @ 2023-03-13 160/week @ 2023-03-20

702 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.

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

~3.5MB
~72K SLoC