-
Notifications
You must be signed in to change notification settings - Fork 205
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
Empty classnames despite installing all the correct dependancies? #94
Comments
Have you configured webpack to use CSS Modules? We are currently working on making CSS Modules optional, but at the moment they are required. |
Yup, this is an ex create-react-app by the way:
|
That bottom loader only processes files in {
test: /\.css$/,
loader: 'style!css?modules',
include: /flexboxgrid/,
} |
Oh god, sorry about that... Its been a long day! Fixed that and Im now faced with this issue which is a bit odd...
Thanks! Researching this shows that you have to exclude the css... But doesnt what Ive already got do that?
Apologies for my ignorance, trying to learn the ropes of everything... |
Hm, it's hard to tell. 😕 Is the code in the first snippet yours? |
Nope, it just appeared when I did |
This is something very specific to your environment, if it turns out to be related to react-flexbox-grid after all, I'll reopen. But let's continue the discussion, do you mind pasting the whole |
Thanks for still taking an interest... Really driving me crazy! |
Ah, found it. You have another loader: {
test: /\.css$/,
loader: 'style!css?importLoaders=1!postcss'
}, It isn't scoped to anything and therefore applies to all CSS files, messing up the previous loaders. If your CSS source files are in {
test: /\.css$/,
loader: 'style!css?importLoaders=1!postcss',
include: path.join(__dirname, 'src')
}, |
Aha, thanks a lot! This is the final solution which worked for me:
|
Is my
package.json
, followed all the instructions on the readme. Not getting any errors or warnings, just no class names when I use the elements like so:The text was updated successfully, but these errors were encountered: