-
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
[gatsby-plugin-postcss-sass] Separate PostCSS and Sass #2776
Comments
Plugins are cheap :-) There's plenty of people still using sass so no reason to kill this plugin. Would be happy to take a PR for a new plugin gatsby-plugin-postcss that makes it easy to add postcss plugins. There's also an argument that we do this in core as we support postcss there but I like the idea of making postcss configurable through a plugin more than creating an "official" way to modify the core css setup. |
Wasn't suggesting you kill it. Just suggesting that the two things were prised apart, so people could use PostCSS without using Sass, but an alternative purely PostCSS plugin is fine. I'll try and have a look at this next week if you think it's worthwhile. |
For sure! A number of people have asked for easier ways to work with postcss plugins. |
FWIW this plugin is removed in v2, it just exposes a postcss plugins option on the sass-plugin. You can use it with postcss that way or seperatelly if you wish |
we should add a postcss plugin tho, |
Is there a roadmap for V2 anywhere? |
So is it worth me putting together a |
v2 is still a bit away — but if you have a workaround now, it'd be easier to wait for sure. |
I actually spent the day playing with Styled Components and think I'm going to jump down that rabbithole instead of the CSSModules / PostCSS cocktail, so probably don't need right now. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues as many of them have already been resolved with the latest updates or explained in a previous issue. Feel free to open a new one if you still experience this problem or a similar one! 👍 |
It would seem to me to make more sense to separate PostCSS configuration and Sass configuration. A lot of people (myself included) have moved away from Sass, using Post CSS to retain a few of the choice features alongside CSS modules.
Currently gatsby-plugin-postcss-sass is doing two things - configuring Webpack to handle .scss files and exposing configuration for adding PostCSS plugins. I think it would make more sense if these two were separated. My prefered option would be to split it into two parts: gatsby-plugin-postcss and gatsby-plugin-sass. Otherwise the only other option for someone wanting to use PostCSS without Sass is to fork the plugin and rip out the Sass configuration - if decoupling Sass and postcss isn't an option, would you accept a PR for a gatsby-plugin-postcss which just exposes postcss plugins through its config?
Another option would be to make it a postcss plugin with optional Sass support, toggleable from its config.
The text was updated successfully, but these errors were encountered: