chill_hugoplate/postcss.config.js

45 lines
826 B
JavaScript
Raw Permalink Normal View History

2023-05-25 10:41:54 +00:00
const purgecss = {
content: ["./hugo_stats.json"],
defaultExtractor: (content) => {
const elements = JSON.parse(content).htmlElements;
return [
...(elements.tags || []),
...(elements.classes || []),
...(elements.ids || []),
];
},
safelist: [
/^swiper-/,
/^lb-/,
/^gl/,
/^go/,
/^gc/,
/^gs/,
/^gi/,
2023-06-01 09:35:53 +00:00
/^gz/,
2023-07-24 05:06:46 +00:00
/^gprev/,
/^gnext/,
2023-05-25 10:41:54 +00:00
/^desc/,
/^zoom/,
2023-05-28 02:45:19 +00:00
/^search/,
2023-05-29 10:36:58 +00:00
/^:is/,
2023-05-25 10:41:54 +00:00
/dark/,
/show/,
/dragging/,
/fullscreen/,
/loaded/,
/visible/,
/current/,
/active/,
],
};
module.exports = {
plugins: {
tailwindcss: {},
"@fullhuman/postcss-purgecss":
process.env.HUGO_ENVIRONMENT === "production" ? purgecss : false,
autoprefixer: process.env.HUGO_ENVIRONMENT === "production" ? {} : false,
},
};