-
Notifications
You must be signed in to change notification settings - Fork 20
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
Can't get CSS Modules to work on Meteor 1.6 (still) #106
Comments
I suppose, I might be lacking some babel plugin, but all was working great on 1.5 :( |
I've created demo repository with just clean Meteor 1.6, meteor-css-modules and Babel with env and react presets. Here it is: https://github.com/neoromantic/meteor-cssmodules-1.6 I can't get imported styles to work there either. What am I missing? Anyone? |
While fighting with this, I've discovered a bug in Meteor 1.6 (rather unsettling) that prevented me from building my (1.5) app. So, please nevermind my plead for urgency and sorry for that also, nerves :) But problem stands, can't get css-modules to work on 1.6. |
I have the same problem. I'm curious if this have to do with the fact that node 8 supports import and export natively? And meteor removed Reify that made it possible before. |
I ran into the same thing - it seems like a problem with the default export. Until it gets fixed, I found a quick fix (depending how many places you are importing styles) is to import import { styles } from './styles.m.css'; |
#106 (comment) works for me, and using sass/scss. 💃
|
Wow, cool. But is it meteor-css-modules bug or something regarding node8/babel? Seems like no brainer to replace it all in my code, but feels wrong to do that not knowing why it is so. In any case, thanks a lot, guys. |
However, react-toolbox doesn't work :( Do you have any idea on how to work around that one? I use react-toolbox installed with npm. |
It looks like this is a change in 1.6. I've chimed in on a Meteor issue report, so we'll wait to see what the feedback is. In the meantime, you can also import the default styles by appending |
FYI, I get this same problem using css-modules with typescript (replaced babel with barbatus/typescript). I needed to follow comments above as well and |
@nathantreid so, did anyone managed to get react-toolbox working well with meteor 1.6 and css-modules 3.0.0? I couldn't. Is there a point in trying? |
Meteor 1.6.1 included the imports fix, so I've published v3.0.1 to support it (and fix a couple of other bugs). @neoromantic react-toolbox now works in my tests! |
Hi, thanks for the nice work. I tried to install v3.0.1 but there seems to be a conflict : Here is the list of installed packages:
I started with a fresh new meteor project, but can't make it work... |
@thoomasbro Based on your package versions, it looks like you're running Meteor 1.6; for v3.0.1, you'll need to be on Meteor 1.6.1. Meteor 1.6.0.1 is still the recommended release (or it was yesterday, anyway) so to create a new project with Meteor 1.6.1, add the
You can use the same flag to update an existing project. |
thanks, seems to work like a charm! |
I updated to [email protected] and nathantreid:[email protected]. The import works now and the components are styled for the normal js style import of |
@warmbowski I just ran a test with barbatus:typescript, and importing is working. You'll need to use the format To remove the
Sample project here: https://github.com/nathantreid/css-modules-barbatus-typescript-sample |
Hi, If there is always a problem for some on meteor 1.6.1.1 and meteor-css-modules 3.1.3 to properly display react-toolbox components, I have no problem using the I'm importing CSS in Then I'm importing react-toolbox themes customizations like that |
@xlinbsd Can you elaborate on the issue you are experiencing (expected vs actual behavior) and provide a reproduction repo? Thanks! |
@nathantreid, I have no issue to demonstrate. |
I've been using this package for awhile now, along with meteor 1.4, 1.5 and now I'm trying to get it working with 1.6. Also, I use react-toolbox.
Currently, I just get unstyled components, as if no
import styles from 'file.css'
were working. No errors, I even see 'processing files with nathantreid:meteor-css-modules' line when run devserver. But no css code gets to client.I suppose my configuration is a bit wrong, could anyone point me to an error?
Here's my setup:
.meteor/packages
package.json
.babelrc:
I use styles like that:
@nathantreid if you could help soon, it would get me out of deep shithole, since I just can't release my project after Meteor 1.6 came around (old version doesn't builds in my CI process, i have to upgrade to 1.6 as it seems)
The text was updated successfully, but these errors were encountered: