Previous version made GPDR-friendly
This commit is contained in:
14
src/transforms/html-min-transform.js
Normal file
14
src/transforms/html-min-transform.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import htmlmin from 'html-minifier';
|
||||
|
||||
export default 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;
|
||||
}
|
||||
Reference in New Issue
Block a user