-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpostcss.config.js
More file actions
57 lines (55 loc) · 1.27 KB
/
postcss.config.js
File metadata and controls
57 lines (55 loc) · 1.27 KB
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
const stylelint = require('stylelint');
const stylelintConfig = require('./stylelint.config');
const env = process.env.NODE_ENV || 'development';
const path = require('path');
module.exports = {
env,
map: {
inline: false
},
plugins: [
require('postcss-import')({
plugins: [
stylelint({
config: stylelintConfig,
ignoreFiles: [
path.join(__dirname, 'node_modules/**/*.css'),
path.join(__dirname, 'dist'),
],
})
]
}),
require('postcss-preset-env')({
stage: 2, // default stage is 2
preserve: false,
autoprefixer: {
grid: true
},
features: {
'color-mod-function': { unresolved: 'warn' },
'custom-media-queries': {}
},
browsers: ['>= 5% in DK', 'ie 11']
}),
require('postcss-color-function'),
require('postcss-hexrgba'),
require('postcss-calc'),
require('postcss-nested'),
require('cssnano')({
autoprefixer: false,
discardComments: {
removeAll: true
},
mergeLonghand: true,
colormin: false,
zindex: false,
discardUnused: {
fontFace: false
}
}),
require('postcss-reporter')({
clearMessages: true,
throwError: false
})
]
};