html-minifier
html-minifier copied to clipboard
removeRedundantAttributes seems to be enabled by default
When running
NODE_ENV=production ./node_modules/.bin/node-minify --compressor html-minifier --input './static/index.html' --output './static/index.html' --option '{"collapseWhitespace": true, "collapseInlineTagWhitespace": true, "preserveLineBreaks": true, "removeScriptTypeAttributes": true, "conservativeCollapse": true }'
I do get a file where type="text" is removed from input elements.
When I run
NODE_ENV=production ./node_modules/.bin/node-minify --compressor html-minifier --input './static/index.html' --output './static/index.html' --option '{"collapseWhitespace": true, "collapseInlineTagWhitespace": true, "preserveLineBreaks": true, "removeScriptTypeAttributes": true, "conservativeCollapse": true, "removeAttributeQuotes": false, "removeRedundantAttributes": false }'
It's not the case and it works like expected.
The readme shows is should be disable by default, but this is not the case: https://github.com/kangax/html-minifier/commit/9802dfe2b29c5a60c7de3df1897bdad1889494f6#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R41
Your example does not use removeRedundantAttributes but removeAttributeQuotes. Is this really the code that you have used?
Thanks for taking the time. I meant removeRedundantAttributes indeed. Updated above comment.