diff --git a/src/transforms/html-min-transform.js b/src/transforms/html-min-transform.js
index 7d0c8f99..e84cbe30 100644
--- a/src/transforms/html-min-transform.js
+++ b/src/transforms/html-min-transform.js
@@ -1,14 +1,12 @@
const htmlmin = require('html-minifier');
module.exports = function htmlMinTransform(value, outputPath) {
- if (outputPath.indexOf('.html') > -1) {
- let minified = htmlmin.minify(value, {
- useShortDoctype: true,
- removeComments: true,
- collapseWhitespace: true,
- minifyCSS: true
- });
- return minified;
- }
- return value;
+ if (!outputPath.endsWith('.html')) return value;
+
+ return htmlmin.minify(value, {
+ useShortDoctype: true,
+ removeComments: true,
+ collapseWhitespace: true,
+ minifyCSS: true
+ });
};