Skip to content

Add ability to load custom PostCSS plugins#32

Merged
MartijnCuppens merged 7 commits into
Intracto:masterfrom
gijsroge:fix/postcss-custom-config
Oct 3, 2019
Merged

Add ability to load custom PostCSS plugins#32
MartijnCuppens merged 7 commits into
Intracto:masterfrom
gijsroge:fix/postcss-custom-config

Conversation

@gijsroge

@gijsroge gijsroge commented Oct 2, 2019

Copy link
Copy Markdown
Contributor

No description provided.

gijsroge and others added 7 commits October 2, 2019 21:47
The getPostCSSConfiguration function was not blocking therefore the
gulp-postcss instance was called before the config was loaded.
This caused gulp-postcss to search for the config itself and throw an
error that we did not catch when the user did not have a config.
Comment thread lib/gulp/css.js
Comment on lines +35 to +36
async function cssCompile({src, dest, minified = true, browserSync = false}) {
const {plugins, options = {}} = await getPostCSSConfiguration(minified);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found the little culprit..

The function that loads the PostCSS config wasn't called in a blocking way so it continued and tried to initiate gulp-postcss before actually getting the PostCSS config therefore gulp-postcss threw an error that I didin't handle.

Now that its blocking there is always a config available. Either the config from the user or the default one we provide.

@MartijnCuppens MartijnCuppens changed the title Fix for unhandled PostCSS load config error Add ability to load custom PostCSS plugins Oct 3, 2019
@MartijnCuppens MartijnCuppens merged commit 4896611 into Intracto:master Oct 3, 2019
@gijsroge gijsroge deleted the fix/postcss-custom-config branch January 13, 2020 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants