-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpostcss.config.js
More file actions
36 lines (33 loc) · 910 Bytes
/
postcss.config.js
File metadata and controls
36 lines (33 loc) · 910 Bytes
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
const path = require('path')
const root = path.join(__dirname, './src')
/* eslint-disable global-require */
/* eslint-disable import/no-extraneous-dependenies */
const result = webpack => ({
parser: 'stylus',
plugins: [
require('postcss-import')({
addDependencyTo: webpack,
path: `${root}/styles`
}),
require('postcss-custom-properties')({
warnings: false
}),
require('postcss-color-function'),
require('postcss-for'),
require('postcss-nested'),
require('autoprefixer')({
remove: false
}),
require('postcss-autoreset')({
rulesMatcher: ({ selector, parent: { name, type } }) => (
!/(_|:|\[|>|\+)/.test(selector) && type !== 'atrule' && name !== 'keyframes'
),
reset: {
all: 'initial',
fontFamily: '"Roboto", sans-serif'
}
}),
require('postcss-initial')
]
})
module.exports = result