0

I'm trying to update to webpack 2 and I'm stuck in post css loading phase. Here's my relevant code:

    {
      test: /\.scss$/,
      loader: ExtractTextPlugin.extract({ fallback: 'style-loader', use: 'css-loader!postcss-loader!sass-loader?outputStyle=expanded&sourceComments=true'}),
      exclude: /\/custom-apps\/|future/
    },
    {
      test: /\.scss$/,
      loader: 'style-loader!css-loader?modules&localIdentName=[local]___[hash:base64:5]&importLoaders=2!postcss-loader!sass-loader?outputStyle=expanded&sourceComments=true',
      include: /\/custom-apps\/|future/
    },

The error I get:

PostCSS Config could not be loaded. Please check your PostCSS Config.

R01010010
  • 5,670
  • 11
  • 47
  • 77

1 Answers1

0

Adding a local file at project root path

postcss.config.js

with content:

module.exports = {
  importLoaders: 1,
};

did it for me.

Also putting !postcss-loader?importLoaders: 1 in my example code I think should work.

R01010010
  • 5,670
  • 11
  • 47
  • 77