- Removed experimental feature json-ld as it was too buggy.
- Added option to disable comments.
- Changed regex for removing comments due to reported buggy sometimes. Thanks to @MuetzeOfficial for the suggested fix.
- Added fix for whitespace before doctype. Thanks to @alpipego for the fix.
- Added experimental feature support for minify
<script type="json-ld"></script>
.
- A complete rewrite and bump to version 2.
- Inline SVG files are supported and will be minified.
- Custom Elements support (
<my-element>My content</my-element>
). - The slash of self closing tags are removed from
/>
to>
. - Unneeded element data are removed from
style
andscript
tags (type="text/css"
andtype="text/javascript"
). - The minifier is now aware of what's inside
<head></head>
and will minify it without leaving the spaces (except forstyle
andscript
). - Instead of whitelist all allowed elements, it minifies all tags, but skip
textarea
,code
,pre
andscript
. - The code length is reduced from around 300 lines to around 200 lines.
- Instead of remove CDATA, it will now be kept.
- Better JSON support.
Minor bug fixes
Initial release