title: Webpack erroring on mini-css-extract-plugin loader
body: <p>When I try to use the loader for mini-css-extract-plugin webpack returns the following error:</p>
  <pre><code>/node_modules/mini-css-extract-plugin/dist/loader.js:122
      for (const asset of compilation.getAssets()) {
                                      ^
  
      TypeError: compilation.getAssets(...) is not a function or its return value is not iterable
  </code></pre>
  <p>I am requiring the plugin and invoking the loader in my prod config file:</p>
  <pre><code>const { CleanWebpackPlugin } = require(&quot;clean-webpack-plugin&quot;);
  const path = require(&quot;path&quot;);
  const common = require(&quot;./webpack.common&quot;);
  const merge = require(&quot;webpack-merge&quot;);
  const MiniCssExtractPlugin = require(&quot;mini-css-extract-plugin&quot;);
  
  module.exports = merge(common, {
    mode: &quot;production&quot;,
    output: {
      filename: &quot;[name].[contentHash].bundle.js&quot;,
      path: path.resolve(__dirname, &quot;dist&quot;)
    },
    plugins: [
      new MiniCssExtractPlugin({filename: &quot;[name].[contentHash].css&quot;}), 
      new CleanWebpackPlugin()
    ],
    module: {
      rules: [
        {
          test: /\.scss$/,
          use: [
            MiniCssExtractPlugin.loader, //3. Extract css into files
            &quot;css-loader&quot;, //2. Turns css into commonjs
            &quot;sass-loader&quot; //1. Turns sass into css
          ],
        },
      ],
    },
  });
  </code></pre>
  <p>I have it included in my devDependencies:</p>
  <pre><code>&quot;mini-css-extract-plugin&quot;: &quot;^1.3.6&quot;,
  </code></pre>
  <p>But still I receive the error. I haven't found anything in the [documentation][1] to indicate what could be happening. Is there something I'm overlooking with this code?</p>
  <p>Why would methods from loader.js be getting flagged as 'not a function?'
  [1]: <a href="https://www.npmjs.com/package/mini-css-extract-plugin" rel="noreferrer">https://www.npmjs.com/package/mini-css-extract-plugin</a></p>