chill_hugoplate/exampleSite/postcss.config.js
2023-05-28 08:45:19 +06:00

43 lines
800 B
JavaScript

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/,
/^search/,
/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,
},
};