title: Webpack 4: How to use ExtractTextPlugin.extract()
body: <p>I am migrating my project from Webpack 3 to Webpack 4, and I want to replace <code>extract-text-webpack-plugin</code> with <code>mini-css-extract-plugin</code>.</p>
  <p>My webpack config has this section</p>
  <pre><code>if (options.extract) {
    return ExtractTextPlugin.extract({
      use: loaders,
      fallback: 'vue-style-loader'
    })
  } else {
    return ['vue-style-loader'].concat(loaders)
  }
  </code></pre>
  <p>Obviously I cannot perform a <code>return MiniCssExtractPlugin.extract({/*..*/})</code>.</p>
  <p>What is the equivalent syntax for <code>mini-css-extract-plugin</code>?</p>
  <p>Complete webpack configuration <a href="https://gist.github.com/hanxue/74691af423247c9028c7ff811f373608" rel="nofollow noreferrer">https://gist.github.com/hanxue/74691af423247c9028c7ff811f373608</a></p>