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

Synchronous support? #74

Closed
florian-bd opened this issue Dec 11, 2017 · 9 comments
Closed

Synchronous support? #74

florian-bd opened this issue Dec 11, 2017 · 9 comments

Comments

@florian-bd
Copy link

At the moment it's not possible to use this plugin in synchronous mode.

postcss([postcssModules()]).process(cssString).css;

Is there any plan to support it in the future?

@TrySound
Copy link
Contributor

@florian-bd Postcss itself supports sync mode only for debug purpose, not production using. What is use case which can't handle asynchronously?

@florian-bd
Copy link
Author

I am trying to use it in a babel plugin :)

@TrySound
Copy link
Contributor

Are you trying to css-modules-in-js?

@florian-bd
Copy link
Author

No sure what that is but yeah basically I want to inject my css in the js

@TrySound
Copy link
Contributor

TrySound commented Dec 11, 2017

@florian-bd But there're so much production ready libs for this, why do not use one of them?

@florian-bd
Copy link
Author

Everything I found is tied to webpack. I am writing a component library and I was trying to avoid to serve the css as separate files so that the client project doesn't have to handle this with a loader.
I guess I should use CSS in JS in my library instead.

@TrySound
Copy link
Contributor

Sure. emotion is quite nice.

@florian-bd
Copy link
Author

Thanks for your help

@wangking873
Copy link

https://www.npmjs.com/package/postcss-modules-sync

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

4 participants