title: "TypeError: Invalid value used in weak set" while build using webpack
body: <p>I'm trying to add scss to the project. I want to build css files from scss ones, but I get an error that says &quot;TypeError: Invalid value used in weak set&quot; since I added <strong>MiniCssExtractPlugin</strong>.
  Here's my <em>webpack.config.js</em>:</p>
  <pre><code>const path = require('path');
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
  const config = {
    // TODO: Add common Configuration
    module: {},
  };
  
  const js = Object.assign({}, config, {
    name: 'js',
    entry: path.resolve(__dirname, 'index.js'),
    output: {
      path: path.resolve(__dirname, '../some/path/here'),
      filename: 'main.js',
    },
  });
  
  const scss = Object.assign({}, config, {
    name: 'scss',
    entry: path.resolve(__dirname, './scss/styles.scss'),
    plugins: [
      new MiniCssExtractPlugin({
        filename: '[name].css',
      }),
    ],
    module: {
      rules: [
        {
          test: /\.(s*)css$/,
          use: [
            MiniCssExtractPlugin.loader,
            'css-loader',
            {
              loader: 'sass-loader',
              options: {
                implementation: require('sass'),
              },
            },
          ],
        },
      ],
    },
    output: {
      path: path.resolve(__dirname, '../some/path/here'),
      filename: 'styles.css',
    },
  });
  
  module.exports = [js, scss];
  
  </code></pre>
  <p>I googled a lot but didn't find any answers.
  I use Node.js v 8.4.0.</p>
  <p>Console output (There is more, but I think this is enough):</p>
  <pre><code>TypeError: Invalid value used in weak set
      at WeakSet.add (native)
      at MiniCssExtractPlugin.apply (/path/path/path/path/path/path/path/node_modules/mini-css-extract-plugin/dist/index.js:362:18)
  </code></pre>
  <p>PS: I'm new to webpack, so I'll be glad if you help me to make this code better. The main idea is to keep js compilation the same and add scss compilation. I also want to compile included scss files as separated ones.</p>
  <p>PSS: If you need more information, I'll provide some, coz idk what else can be useful.</p>