-
Notifications
You must be signed in to change notification settings - Fork 0
/
postcss.config.mjs
63 lines (59 loc) · 1.72 KB
/
postcss.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import postcsspresetenv from 'postcss-preset-env';
import autoprefixer from 'autoprefixer';
import cssnano from 'cssnano';
import purgecss from '@fullhuman/postcss-purgecss';
export default {
plugins: [
// https://github.com/anandthakker/doiuse
// doiuse({
// browsers: [
// "extends @davidsneighbour/browserslist-config",
// ],
// ignore: ['rem'],
// ignoreFiles: ['**/normalize.css'],
// }),
// purgecss({
// content: ['./hugo_stats.json'],
// // https://github.com/gohugoio/hugo/issues/10338
// // https://discourse.gohugo.io/t/purgecss-and-highlighting/41021
// safelist: {
// greedy: [/highlight/, /chroma/, /dark/],
// },
// fontFace: true,
// //variables: true,
// keyframes: true,
// defaultExtractor: (/** @type {string} */ content) => {
// const els = JSON.parse(content).htmlElements;
// return [
// ...(els.tags || []),
// ...(els.classes || []),
// ...(els.ids || []),
// ];
// },
// }),
// https://github.com/postcss/autoprefixer
autoprefixer(),
// https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-preset-env
// @ts-ignore
postcsspresetenv({
stage: 2,
browsers: ['extends @davidsneighbour/browserslist-config'],
// https://github.com/csstools/postcss-plugins/blob/main/plugin-packs/postcss-preset-env/FEATURES.md
features: {
'nesting-rules': true,
},
debug: true,
}),
// https://cssnano.github.io/cssnano
cssnano({
preset: [
"advanced",
{
discardComments: {
removeAll: true,
},
},
],
}),
],
};