Last active
October 20, 2016 12:44
-
-
Save kaueburiti/6bca2fd221052a0998c19d352c8617f6 to your computer and use it in GitHub Desktop.
Basic PostCSS config to work with some Sass features
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Webpack configs | |
(...) | |
postcss: function(webpack) { | |
return [ | |
require('postcss-import')({ | |
addDependencyTo: webpack, | |
root: rootPath, | |
path: [srcPath, nodeModulesPath] | |
}), | |
require('postcss-cssnext')({ | |
features: { | |
customProperties: { preserve: 'computed' } | |
}, | |
plugins: { | |
afterEach: [ | |
require('postcss-at-rules-variables') | |
], | |
beforeEach: [ | |
require('postcss-custom-properties') | |
] | |
} | |
}), | |
require('postcss-nested'), | |
require('postcss-each')({ | |
plugins: { | |
afterEach: [ | |
require('postcss-at-rules-variables') | |
], | |
beforeEach: [ | |
require('postcss-custom-properties') | |
] | |
} | |
}), | |
require('postcss-for')({ | |
plugins: { | |
afterEach: [ | |
require('postcss-at-rules-variables') | |
], | |
beforeEach: [ | |
require('postcss-custom-properties') | |
] | |
} | |
}), | |
require('postcss-simple-vars'), | |
require('postcss-reporter')({ clearMessages: true }) | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment