-
-
Notifications
You must be signed in to change notification settings - Fork 606
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
Allow to use extra postcss plugins after css-modules related plugins #263
Conversation
Any chance we can get this pulled in? |
Postcss is internal and should not be exposed. It's a implementation detail. |
Makes sense. |
@sokra could you please suggest a solution to apply postcss after css-loader applied? |
I have same situation need to use a custom post-css plugin just after css-loader applied. and I think css-loader should create a hook function to let us to add some extra processes (post-css or more general process) on generated css before plain javascript text. @Strate You PR is a good patch. For current version, I must apply all post-css plugins which css-loader used out-of-box, use them in WebPack postcss settings. for example:
It's wired, but actually worked. |
Are there any alternatives to this? I'm using it because it's the only way for me to use imported values with postcss-inline-svg but am worried about being stuck on an old version. I tried what @longwosion suggested but was having trouble with the generateScopedName function. |
@sokra what do you think about splitting this loader into 2 parts: cssmodules part & css-loader part?
this solution could made a point to inject postcss plugins after modules without leaking internal implementation from |
I agree with @mbavio I believe this is a feature that css modules should be capable of. |
I wrote a workaround to overcome this flaw in CSS Modules — https://github.com/princed/postcss-modules-values-replace. I'd love to have some feedback on it. |
@sokra I would be really curious about your feedback on @Strate's suggestion and your opinion on the problem in general. While I agree that the concrete solution is flawed since it exposes irrelevant implementation details, I still think that there are several viable use cases where one would like to post-process the css which was generated by css-loader. Preprocessing is no problem since one can just add a I also think that All in all I think some means to be able to post-process the resulting CSS of In case you do not want to leak the fact that postcss is being used internally to the surface, do you maybe have an idea if and how css post-processing could be achieved outside of the scope of |
No description provided.