0
我想使用此模块https://www.npmjs.com/package/html-minifier如何使用html-minifier npm模块?
node.js的再压缩我的HTML文件,我有这样的代码
// minify the html code
fse.readFile(filename, function(err, data) {
if (err) return console.error(err);
var result = minify(data.toString(), {
removeAttributeQuotes: false
});
console.log(result);
});
但是它记录相同的代码从原来的文件。它没有缩小它。有谁知道什么是错的?
谢谢