From e1deb69c1adf9c0a8e0092ae5536f53d5c0acc5b Mon Sep 17 00:00:00 2001 From: Andreas Hnida Date: Fri, 26 Apr 2024 23:17:26 +0200 Subject: [PATCH] removed purgecss because it would delete classes that are used when using html in .md files --- postcss.config.js | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/postcss.config.js b/postcss.config.js index f9887c5..a299139 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,12 +1,8 @@ const purgecss = { - content: ["./hugo_stats.json"], + content: ['./hugo_stats.json'], defaultExtractor: (content) => { - const elements = JSON.parse(content).htmlElements; - return [ - ...(elements.tags || []), - ...(elements.classes || []), - ...(elements.ids || []), - ]; + const elements = JSON.parse(content).htmlElements + return [...(elements.tags || []), ...(elements.classes || []), ...(elements.ids || [])] }, safelist: [ /^swiper-/, @@ -33,13 +29,12 @@ const purgecss = { /active/, /mark/, ], -}; +} module.exports = { plugins: { tailwindcss: {}, - "@fullhuman/postcss-purgecss": - process.env.HUGO_ENVIRONMENT === "production" ? purgecss : false, - autoprefixer: process.env.HUGO_ENVIRONMENT === "production" ? {} : false, + // '@fullhuman/postcss-purgecss': process.env.HUGO_ENVIRONMENT === 'production' ? purgecss : false, + autoprefixer: process.env.HUGO_ENVIRONMENT === 'production' ? {} : false, }, -}; +}