pdf-editor/postcss.config.js

16 lines
496 B
JavaScript
Raw Permalink Normal View History

2023-05-17 01:12:02 +02:00
const purgecss = require('@fullhuman/postcss-purgecss')({
content: [ './hugo_stats.json' ],
defaultExtractor: (content) => {
let els = JSON.parse(content).htmlElements;
return els.tags.concat(els.classes, els.ids);
}
});
module.exports = {
plugins: [
require('autoprefixer'),
...process.env.HUGO_ENVIRONMENT === 'production' ? [purgecss] : [],
require('cssnano')({preset: ['advanced', {"discardComments": {"removeAll": true}}]}),
]
};