forked from react-boilerplate/react-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpostcss.config.js
40 lines (37 loc) · 1.51 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
/* eslint-disable sort-keys */
module.exports = ({ _file, options, env }) => Object.assign({
plugins: {
'postcss-triangle': {}, // "triangle: pointing-<up|down|left|right>;"
// "width: [length];"
// "height: [length];"
// "background-color: [color];" (optional)
'postcss-circle': {}, // "circle: [diameter] [color]"
'postcss-center': {}, // "top: center; left: center;"
//? don't forget about "position: relative" for parent
'postcss-pxtorem': {},
'postcss-utilities': {}, // INFO: http://ismamz.github.io/postcss-utilities/docs
'postcss-short': {}, // INFO: https://github.com/jonathantneal/postcss-short
'postcss-will-change': {},
'postcss-vmin': {},
'postcss-cssnext': { //NOTE: CSSnext has autoprefixer
browsers: [
'> 5%',
'last 2 versions',
'ie >= 10',
'ios >= 7'
]
},
'rucksack-css': {}, // INFO: https://www.rucksackcss.org/docs/
// package includes:
// postcss-alias => "@alias {cl: color; l: left; ...}"
// postcss-clearfix => "clear: fix"
// postcss-easings => INFO: http://easings.net
'postcss-svgo': env === 'production' ? {} : false,
'css-mqpacker': env === 'production' ? {} : false,
'postcss-merge-rules': env === 'production' ? {} : false,
cssnano: env === 'production' ? {} : false,
// Reporter //TODO: check if it works
'postcss-browser-reporter': env === 'production' ? false : {} // OR
// 'postcss-reporter': env === 'production' ? false : {}, // OR
}
}, options);