Skip to content
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 apply some postcss plugins after cssmodules #262

Closed
Strate opened this issue Apr 19, 2016 · 5 comments
Closed

Allow to apply some postcss plugins after cssmodules #262

Strate opened this issue Apr 19, 2016 · 5 comments

Comments

@Strate
Copy link

Strate commented Apr 19, 2016

I need to apply some postcss plugins after aplpying plugins relted to cssmodules. It need to add an extra class scope to all rules in all files

@joshwnj
Copy link

joshwnj commented Apr 20, 2016

@Strate there's an example of adding extra postcss plugins here: https://github.com/css-modules/webpack-demo/blob/master/webpack.config.js#L26-L29

@Strate
Copy link
Author

Strate commented Apr 20, 2016

@joshwnj in that example postcss plugins applies before applying plugins, related to cssmodules (which applied by css-loader). In a fact, I need something like this:

require("style!postcss?mypack!css?modules!./file.css").

But the is not possible, because css-loader returns a jsvscript module, not a css file.
I have implemented this PR: #263

@joshwnj
Copy link

joshwnj commented Apr 20, 2016

I see, thanks for the clarification 👍

@avanderhoorn
Copy link

I'm needing to do the exact same thing. Did you figure this out? Is it possible?

@michael-ciniawsky
Copy link
Member

I'm working on postcss-loader v2 with the goal to not depend upon css-loader anymore in the near future, bc of usecases like that :), for now this won't fix sry

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

No branches or pull requests

5 participants