purifycss работает не так, как ожидалось
PurifyCss не работает должным образом, поскольку я использую проект .net. Я хочу удалить неиспользуемые CSS. Вот шаги, которые я сделал.
- Я установил очистку с помощью узла
- Вот мой .js для purifycss
- выходной файл создается, но CSS не уменьшается
это сообщение, которое я получаю
PurifyCSS has reduced the file size by ~ NaN%
const purify = require("purify-css")
let content = ['*.cshtml'];
// Glob pattern to ref all HTML files from root directory.
let css = ['/Assets/stylesheets/main.css'];
// Glob pattern to ref all CSS files from root directory.
let options = {
// Will write purified CSS to this file.
output: 'purified.css',
// Output file name
minify: true,
// Will minify CSS code in addition to purify.
info: true,
// Output information on how much reduction was achieved,
rejected: true
// Logs out removed selectors
};
purify(content, css, options, function (purifiedAndMinifiedResult) {
console.log(purifiedAndMinifiedResult);
});