cr0ybot / gulp-wp

A reusable, extendable, updatable Gulp workflow for WordPress themes & plugins

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding additional Post CSS config doesn't work

cr0ybot opened this issue · comments

The README says you can include additional Post CSS configuration by following the directions at https://www.npmjs.com/package/postcss-load-config, but nothing happens if you create a .postcssrc.json or postcss.config.js file.

It seems like if any options are passed to gulp-postcss at all, it will not load a local config. We might have to use postcss-load-config directly and insert autoprefixer if no plugins are found. See postcss/gulp-postcss#128.

I wanted to add postcss-sizes to a project but this does nothing:

file: .postcssrc.json

{
	"plugins": {
		"postcss-size": {}
	}
}

file: postcss.config.js

module.exports = {
	plugins: [ require( 'postcss-size' ) ],
};