Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Basic PostCSS config to work with some Sass features
// 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
You can’t perform that action at this time.