-
-
Notifications
You must be signed in to change notification settings - Fork 608
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
Should there be an inline option for universal apps using modules? #159
Comments
👍 i'd also like to see a way of css modules composing in a way that could interoperate with tools that are expecting a real class name rather than the requiring concatenated to it. |
@fingermark @bdefore Still interested in this ? Could one of you try to add this and send PR 😛 ? |
@michael-ciniawsky It's been a while since I made that post! The desire still remains, but whether others have an appetite for the sugar/magic I'm not sure. My current use relies on css-loader and postcss-loader, and looks roughly like this: in components/Foo.js:
in css/components/Foo.css:
What would be nice is if I could do the following:
in css/components/Foo.css:
A couple small wins there, but the current approach is not that painful either. I could be completely misunderstanding what this issue originally asked for. |
@bdefore while useful, I feel that this approach would make using "global" classes a pain. And since classes being global is the default in HTML, the loader altering the default behaviour might cause a lot of raised eyebrows. Added on that, the current approach of importing local css modules and accessing classes as properties on it feels a little more sane - linting and autocomplete tools can be built easily. |
@kumarharsh agreed. the approach i've described is probably too proscriptive for its own good. |
This would require changes to webpack core itself, to look up for CSS following a certain pattern like
and is out of scope for |
I really like the idea of CSS modules and am interested in using it for an upcoming app. That app is also universal and I'm experimenting with https://github.com/erikras/react-redux-universal-hot-example but am running into an error where
compose
isn't working with CSS Modules (see more here: erikras/react-redux-universal-hot-example#184).Would an
inline
option formodules
be the correct solution for working with universal apps?The text was updated successfully, but these errors were encountered: