-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(gatsby-plugin-postcss): Always ensure postcss.config.js is loaded #16521
fix(gatsby-plugin-postcss): Always ensure postcss.config.js is loaded #16521
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for fixing this! Could you please add a test that asserts the correct behaviour here so that we don't see regressions in the future?
Yes, I could. I will do my best to add missing tests this week. |
Hey @mdreizin! Do you think you will have time to take a look at those tests? If not - that's not a problem - I can add test case for |
@pieh No, I don’t. I will be able to write them only at the weekend. It would be nice if you could add missing tests. |
Thanks for the tests @pieh 💜 |
Diff for snapshot file is messy, mostly because we didn't reset mocked calls before. Here's somewhat easier to see snapshot diff between master and this PR - https://gist.github.com/pieh/6ee5420e34bd61ca36d4392cbd64171c |
Description
If you specify
cssLoaderOptions
thenpostcss-loader
wound not picked uppostcss.config.js
config.The
postcssOptions
options would containcssLoaderOptions
property ({cssLoaderOptions: {...}}
) andpostcss-loader
gets it as is and does not use some built-in defaults.This PR aims to fix that and also add some code-style adjustments to align with existing codebase.
Related Issues
#10861