posthtml / htmlnano

Modular HTML minifier, built on top of the PostHTML

Home Page:https://htmlnano.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sorting attributes and classes for better gzipping

MathGeniusJodie opened this issue · comments

right now I'm using "posthtml-attrs-sorter", considering making my own plugin for class names, figured it should probably be rolled into a minifier, the difference is pretty substantial, about 1-2% smaller in my testing

That'd be awesome!

Yes, I think it's better to implement it as htmlnano module, so it can sort all things (e.g., attributes, class names, meta tags, etc).

commented

@MathGeniusJodie @maltsev

Sorting based on alphabetical order has been implemented in #95 and is supposed to be landed in the next version (according to #95 (comment)). Sorting based on frequency will be implemented in the future (probably still by me).