chill_hugoplate/exampleSite/postcss.config.js

42 lines
785 B
JavaScript
Raw 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/,
/^desc/,
/^zoom/,
/^:is/,
/^dark/,
/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,
},
};