Feature Request: make Postcss plugins configurable, update dependancies and add to documentation
See original GitHub issueThere seems quite a lot of issues related to configuring Postcss plugins and the gatsby-plugin-postcss-sass
plugin.
Here are some:
#2776, [gatsby-plugin-postcss-sass] Separate PostCSS and Sass
#2462, Update postcss related plugins
#2823, Ignored custom PostCSS config when building site
#3208, Tailwind CSS (postcss plugin) does not work via gatsby-plugin-postcss-sass
<= mine
#2188, RuckSack-CSS unhandled rejection
#2106, Would love to see an uncss plugin
#2328, [gatsby-source-wordpress] UNHANDLED REJECTION during gatsby build or develop
#1347, [1.0] When using gatsby-plugin-sass final output CSS isn’t run through autoprefixer
It would great to be able to easily configure Gatsby’s Postcss plugins, and have this support documented. As well as update the current postcss dependancies. The later I’d guess is coming in the next major rev of Gatsby with the latest version of webpack.
Here are two solid examples of other webpack static site generators that also include Postcss and cssnext by default, and natively expose this in both their configuration and documentation.
Nuxt.js
How to add PostCSS plugins? Customize PostCSS Loader plugins
Spike
A robust search solution, like Algolia or equivalent, integrated into Gatsby’s docs would also likely be quite helpful.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:17 (8 by maintainers)
Top GitHub Comments
@KyleAMathews As someone who’s moved on from Sass, but still prefers writing CSS in
.css
files, I’m glad to hear there’s interest in improving PostCSS support.I’d love to be able to drop a
postcss.config.js
into the project root, install the dependencies, and have Gatsby handle the rest.FWIW, this is my go-to PostCSS config (all the benefits of Sass, with none of the features I don’t want) - https://github.com/jonmilner/postcss-config/blob/master/postcss.config.js
Removing any default postcss setup would be ideal.
Since some cases require carefully controlling the order in which the postcss plugins run, it would be cleaner to start from scratch than to have to override or merge with a default postcss config.