Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

How should I use this if I also have CSS modules enabled along with babel-plugin-react-css-modules ? #13

Open
mkarajohn opened this issue Sep 2, 2017 · 1 comment

Comments

@mkarajohn
Copy link

Sorry for making a question to the issue tracker, but since this is not a very popular loader, I figured it'd be easier to get an answer from here.

So, I have this in my webpack config

{
        test: /\.s(a|c)ss$/,
        use: ExtractTextPlugin.extract({
          // https://github.com/webpack-contrib/extract-text-webpack-plugin#extract
          use: [
            {
              loader: 'css-loader',
              options: {
                sourceMap: true,
                modules: true,
                localIdentName: cssModuleClassPattern
              }
            },
            'sass-loader'
          ],
          fallback: 'style-loader'
        })
      },

I tried using the loader inline for one specific import, but I cannot get it to work this way.
Where should this loader go in the config chain, considering the use of ExtractTextPlugin?

@WillsonHaw
Copy link

Inline should work, that's how I'm using it. Did you prefix with !!?
ie: import * as sassVars from '!!sass-variable-loader!./path-to/file.scss'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants