diff --git a/src/transforms/html-min.js b/src/transforms/html-min.js new file mode 100644 index 0000000..d5398e3 --- /dev/null +++ b/src/transforms/html-min.js @@ -0,0 +1,13 @@ +const htmlmin = require('html-minifier'); + +module.exports = (value, outputPath) => { + if (outputPath && outputPath.indexOf('.html') > -1) { + return htmlmin.minify(value, { + useShortDoctype: true, + removeComments: true, + collapseWhitespace: true, + minifyCSS: true + }); + } + return value; +} \ No newline at end of file