Skip to content

Instantly share code, notes, and snippets.

@bretthadley
Last active January 24, 2018 09:36
Show Gist options
  • Save bretthadley/9848a1f568d22734e41b1c6d43f967f1 to your computer and use it in GitHub Desktop.
Save bretthadley/9848a1f568d22734e41b1c6d43f967f1 to your computer and use it in GitHub Desktop.
// my webpack.config.js
{
test: /\.s?css$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [
{
loader: 'css-loader',
options: {
minimize: true,
importLoaders: 1
}
},
{
loader: 'postcss-loader',
options: {
ident: 'postcss',
config: `./postcss.config.js`
}
},
{
loader: 'sass-loader'
}
]
})
}
//my postcss.config.js
module.exports = {
plugins: {
'postcss-flexbugs-fixes': {},
'autoprefixer': {}
}
};
/**
Produces the error "PostCSS Loader Invalid Options options.config should be object"
I've tried changing it to a require(./postcss.config.js) which then produced the error:
"PostCSS Loader Invalid Options options.config['plugins'] should NOT have additional properties"
**/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment