forked from danrasmuson/site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpostcss.config.js
29 lines (28 loc) · 861 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
module.exports = (config, hotLoadedVariables) => [
// require("stylelint")(),
require('postcss-cssnext')({ browsers: 'last 2 versions' }),
// require('postcss-import')({
// addDependencyTo: webpack
// }),
// require("postcss-reporter")(),
/* require global variables */
require('postcss-simple-vars')({
variables: function variables() {
return hotLoadedVariables
},
onVariables(variables) {
// console.log(variables)
},
unknown: function unknown(node, name, result) {
node.warn(result, `Unknown variable ${name}`)
}
}),
/* do math with resolve( ) */
require('postcss-math'),
// require('cssnano'), breaks keyframes
/* enable nested css selectors like Sass/Less */
require('postcss-nested'),
...config.production ? [
require('postcss-browser-reporter')(), // dev
] : [], // prod
]