You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
477 B
21 lines
477 B
const minify = require('express-minify');
|
|
const minifyHTML = require('express-minify-html');
|
|
const CleanCSS = require('clean-css');
|
|
|
|
const cleanCSS = new CleanCSS();
|
|
|
|
module.exports = [
|
|
minify({
|
|
cssmin: source => cleanCSS.minify(source).styles
|
|
}),
|
|
minifyHTML({
|
|
htmlMinifier: {
|
|
removeComments: true,
|
|
collapseWhitespace: true,
|
|
collapseBooleanAttributes: true,
|
|
removeAttributeQuotes: true,
|
|
removeEmptyAttributes: true,
|
|
removeOptionalTags: true
|
|
}
|
|
})
|
|
];
|
|
|