catamphetamine / universal-webpack

Isomorphic Webpack: both on client and server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

css-loader local scoped parameter seem to be ignored

alaingoga opened this issue · comments

Hello, we are starting a new application using your platform and it work smooth, except for the modules query parameter on css-loader that looks like is been ignored. So, in order to apply our styles for one component the :local modifier needs to always be added. Any idea why this is happening. Here you can see the loader configuration. Thanks in advance!

      test: /\.(scss)$/,
      use: ExtractTextPlugin.extract({
        fallbackLoader: 'style-loader',
        loader: ['css-loader?modules&localIdentName=[name]__[local]___[hash:base64:5]&sourceMap','sass-loader']
      })

Don't give me "looks like", post the exact details of what you think is an issue.

I got it working. I found out the modules parameter value equal true needs to be added. So instead of using:
loader: ['css-loader?modules&localIdentName=[name]__[local]___[hash:base64:5]','sass-loader']
it has to be:
loader: ['css-loader?modules=true&localIdentName=[name]__[local]___[hash:base64:5]','sass-loader'].

Yeah, sure.