2023-10-09 03:55:06 +00:00
|
|
|
const purgecss = require("@fullhuman/postcss-purgecss")({
|
2022-03-22 00:05:10 +00:00
|
|
|
content: ["./hugo_stats.json"],
|
|
|
|
defaultExtractor: (content) => {
|
|
|
|
let els = JSON.parse(content).htmlElements;
|
|
|
|
return els.tags.concat(els.classes, els.ids);
|
|
|
|
},
|
2022-02-02 06:43:30 +00:00
|
|
|
});
|
|
|
|
|
2023-02-25 05:13:45 +00:00
|
|
|
if (process.env.HUGO_ENVIRONMENT === "production") {
|
2022-03-27 02:01:43 +00:00
|
|
|
module.exports = {
|
|
|
|
plugins: [purgecss],
|
|
|
|
};
|
|
|
|
}
|