removed purgecss because it would delete classes that are used when using html in .md files
This commit is contained in:
parent
693e49b454
commit
e1deb69c1a
1 changed files with 7 additions and 12 deletions
|
|
@ -1,12 +1,8 @@
|
||||||
const purgecss = {
|
const purgecss = {
|
||||||
content: ["./hugo_stats.json"],
|
content: ['./hugo_stats.json'],
|
||||||
defaultExtractor: (content) => {
|
defaultExtractor: (content) => {
|
||||||
const elements = JSON.parse(content).htmlElements;
|
const elements = JSON.parse(content).htmlElements
|
||||||
return [
|
return [...(elements.tags || []), ...(elements.classes || []), ...(elements.ids || [])]
|
||||||
...(elements.tags || []),
|
|
||||||
...(elements.classes || []),
|
|
||||||
...(elements.ids || []),
|
|
||||||
];
|
|
||||||
},
|
},
|
||||||
safelist: [
|
safelist: [
|
||||||
/^swiper-/,
|
/^swiper-/,
|
||||||
|
|
@ -33,13 +29,12 @@ const purgecss = {
|
||||||
/active/,
|
/active/,
|
||||||
/mark/,
|
/mark/,
|
||||||
],
|
],
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
plugins: {
|
plugins: {
|
||||||
tailwindcss: {},
|
tailwindcss: {},
|
||||||
"@fullhuman/postcss-purgecss":
|
// '@fullhuman/postcss-purgecss': process.env.HUGO_ENVIRONMENT === 'production' ? purgecss : false,
|
||||||
process.env.HUGO_ENVIRONMENT === "production" ? purgecss : false,
|
autoprefixer: process.env.HUGO_ENVIRONMENT === 'production' ? {} : false,
|
||||||
autoprefixer: process.env.HUGO_ENVIRONMENT === "production" ? {} : false,
|
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue