-
Notifications
You must be signed in to change notification settings - Fork 6
/
postcss.config.js
34 lines (33 loc) · 1.03 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
const path = require('path')
const postcssImport = require('postcss-import')
const postcssFlexbox = require('postcss-flexbugs-fixes')
const postcssPresetEnv = require('postcss-preset-env')
const postcssNano = require('cssnano')
const postcssStyleLint = require('stylelint')
const postcssNormalize = require('postcss-normalize')
module.exports = {
plugins: [
postcssNormalize({
allowDuplicates: false,
forceImport: true
}),
postcssFlexbox({ bug4: false }),
postcssImport({ root: process.cwd(), path: path.resolve(process.cwd(), 'src') }),
postcssPresetEnv({
stages: 3,
features: {
'nesting-rules': true,
'media-query-ranges': true,
'color-mod-function': true
},
autoprefixer: { grid: 'autoplace', flexbox: 'no-2009' }
}),
postcssNano({
preset: ['advanced', { discardComments: { removeAll: true }, convertValues: { precision: true } }]
}),
postcssStyleLint({
fix: true,
configFile: path.resolve(__dirname, '.stylelintrc')
})
]
}