website/postcss.config.js

40 lines
806 B
JavaScript
Raw Normal View History

2024-02-14 16:01:14 +00:00
const purgecss = {
content: ['./hugo_stats.json'],
2024-02-14 16:01:14 +00:00
defaultExtractor: (content) => {
const elements = JSON.parse(content).htmlElements
return [...(elements.tags || []), ...(elements.classes || []), ...(elements.ids || [])]
2024-02-14 16:01:14 +00:00
},
safelist: [
/^swiper-/,
/^lb-/,
/^gl/,
/^go/,
/^gc/,
/^gs/,
/^gi/,
/^gz/,
/^gprev/,
/^gnext/,
/^desc/,
/^zoom/,
/^search/,
/^:is/,
/dark/,
/show/,
/dragging/,
/fullscreen/,
/loaded/,
/visible/,
/current/,
/active/,
/mark/,
],
}
2024-02-14 16:01:14 +00:00
module.exports = {
plugins: {
tailwindcss: {},
// '@fullhuman/postcss-purgecss': process.env.HUGO_ENVIRONMENT === 'production' ? purgecss : false,
autoprefixer: process.env.HUGO_ENVIRONMENT === 'production' ? {} : false,
2024-02-14 16:01:14 +00:00
},
}