-
Notifications
You must be signed in to change notification settings - Fork 2
/
postcss.config.js
43 lines (43 loc) · 1013 Bytes
/
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
const purgecss = require("@fullhuman/postcss-purgecss")({
content: ["index.html", "./**/*.html", "./**/*.js"],
options: {
safelist: [/^html/, /"light"^/, /^light-/],
},
});
const cssnano = require("cssnano")({
preset: [
"default",
{
minifyGradients: true,
minifyFontValues: true,
uniqueSelectors: true,
normalizeWhitespace: true,
normalizePositions: true,
normalizeUrl: true,
normalizeDisplayValues: true,
minifySelectors: true,
minifyParams: true,
discardEmpty: true,
mergeIdents: true,
mergeLonghand: true,
mergeRules: false,
minifySelectors: true,
reduceIdents: true,
cssDeclarationSorter: true,
reducetransforms: true,
discardOverriden: true,
discardduplicates: true,
discardComments: true,
},
],
});
module.exports = {
plugins: [
require("postcss-mixins"),
require("postcss-import"),
require("postcss-nested"),
require("autoprefixer"),
cssnano,
...(process.env.NODE_ENV === "production" ? [purgecss] : [])
],
};