forked from DonkeyDushan/piratilol
-
Notifications
You must be signed in to change notification settings - Fork 1
/
postcss.config.js
47 lines (46 loc) · 1.66 KB
/
postcss.config.js
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
const isProduction = (process.env.NODE_ENV === 'production');
module.exports = {
"plugins": isProduction
? [
"postcss-flexbugs-fixes",
[
"postcss-preset-env",
{
"autoprefixer": {
"flexbox": "no-2009"
},
"stage": 3,
"features": {
"custom-properties": false
}
}
],
[
'@fullhuman/postcss-purgecss',
{
content: [
'./src/pages/**/*.{data,jsx,ts,tsx}',
'./src/components/**/*.{data,jsx,ts,tsx}'
],
defaultExtractor: content => content.match(/[\w-/:]+(?<!:)/g) || [],
safelist: {
standard: ["html", "body"],
greedy: [
/bg-(primary|secondary|success|info|warning|danger|light|dark)$/,
/btn-(primary|secondary|success|info|warning|danger|light|dark)$/,
/text-(primary|secondary|success|info|warning|danger|light|dark|white)$/,
/badge$/,
/badge-.*$/,
/card-.*$/,
/h[123456]$/,
/ml-2$/,
/mr-2$/,
/tooltip/
]
}
}
],
] : [
// No transformations in development
]
}