2024-02-14 16:01:14 +00:00
|
|
|
const purgecss = {
|
2024-04-26 23:17:26 +02:00
|
|
|
content: ['./hugo_stats.json'],
|
2024-02-14 16:01:14 +00:00
|
|
|
defaultExtractor: (content) => {
|
2024-04-26 23:17:26 +02:00
|
|
|
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-04-26 23:17:26 +02:00
|
|
|
}
|
2024-02-14 16:01:14 +00:00
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
|
plugins: {
|
|
|
|
|
tailwindcss: {},
|
2024-04-26 23:17:26 +02:00
|
|
|
// '@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
|
|
|
},
|
2024-04-26 23:17:26 +02:00
|
|
|
}
|