Skip to content

Releases: posthtml/htmlnano

1.0.0

17 Apr 07:37
Compare
Choose a tag to compare

After more than 4 years of development, it's time to release a stable 1.0.0 version 🎉

It doesn't contain anything new from the previous 0.2.9 release.
We just did a major upgrade of two dependencies: PurgeCSS and SVGO,
which changed their config format.
Thus we have to do a major release of htmlnano.

You can safely upgrade to htmlnano@1.0.0 if you don't pass any config to minifySvg or removeUnusedCss (while used with PurgeCSS) modules.
Otherwise, you have to adapt the config according to the new PurgeCSS@3 and SVGO@2 config format.

0.2.9

11 Apr 07:53
Compare
Choose a tag to compare

Added

  • minifyConditionalComment support <html> [#125].
  • Minify JS within <script type="module"> [#135].

Fixed

  • collapseWhitespaces around comment [#120].
  • handle CDATA inside script correctly [#122].
  • Minify SVG correctly [#129].

Changed

  • Upgrade to terser@5 (JS minification).

0.2.8

15 Nov 19:53
Compare
Choose a tag to compare

Added

Changed

  • Sort by frequency sortAttributesWithLists #111.
  • Strip more spaces in collapseWhitespace #112.
  • Remove loading="eager" from <img> and <iframe> #114.
  • Remove redundant type from <script> #114.
  • Strip whitespaces between textnode and element #116.

0.2.7

17 Oct 06:44
Compare
Choose a tag to compare

Added

  • More aggressive whitespace removal option #90.
  • Cloudflare SSE support to removeComments #94.
  • Improve compression ratio by sorting attribute values #95.
  • New minifyUrls module #98.
  • New removeAttributeQuotes module #104.
  • Remove type=text/css for link[rel=stylesheet] #102.
  • Collapse crossorigin attributes #107.
  • Exclude excerpt comment for common CMS #108.

Fixed

  • Keep JS inside SVG wrapped in //<![CDATA[ //]] #88.

0.2.6

15 Jul 07:44
Compare
Choose a tag to compare
  • Let PostHTML options to be passed.
  • Fix <script> tags merging without content.

0.2.5

09 Nov 14:37
Compare
Choose a tag to compare
  • Add option to remove unused CSS using PurgeCSS #84.
  • Keep the order of inline and external JS #80.

0.2.4

11 Jul 10:23
Compare
Choose a tag to compare
  • Remove crossorigin from boolean attribute (#78, #79).
  • Disable SVGO plugin convertShapeToPath in safe preset (#76).

0.2.3

14 Feb 12:04
Compare
Choose a tag to compare

Don't strip <g> in SVG by default (#71).

0.2.2

03 Jan 21:51
Compare
Choose a tag to compare
  • Add removeUnusedCss module (#36).
  • Fix bug when tag === false (#66).
  • Add crossorigin to boolean attributes (#67).

0.2.1

01 Dec 12:23
Compare
Choose a tag to compare

Fixed

  • Disable JS minifying on AMP pages (#65).