pages/postcss.config.js

14 lines
330 B
JavaScript
Raw Normal View History

2022-03-22 00:05:10 +00:00
const purgecss = require("postcss-purgecss")({
content: ["./hugo_stats.json"],
defaultExtractor: (content) => {
let els = JSON.parse(content).htmlElements;
return els.tags.concat(els.classes, els.ids);
},
});
if (process.env.HUGO_ENVIRONMENT === 'production') {
module.exports = {
plugins: [purgecss],
};
}