title: Extract local and global styles with mini-css-extract-plugin
body: <p>Until now I have been using <strong>extract-text-webpack-plugin</strong> and <strong>webpack 3</strong> to make two bundle files. One for local styles and one for gloabl styles. </p>
  
  <p>So in global styles file we would extract css from like bootstrap, semantic ... and in local styles bundle we would put our own styles.</p>
  
  <p>Both of those files would have <strong>contenthash</strong> so if for example I change something in my local styles and rebuild app, only the hash from local styles would change and not from globaly styles.</p>
  
  <p>After updateing to webpack 4 a need to use mini-css-extract-plugin instead of extract-text-webpack-plugin.</p>
  
  <p>This was my setup until now. I am trying different things but I dont know how to turn this setup for mini-css-extract-plugin?</p>
  
  <pre><code>const ExtractTextPlugin = require('extract-text-webpack-plugin')
  
  const ExtractLocal = new ExtractTextPlugin({
    filename: 'stylesheet/stylesLocal.[contenthash].local.css',
    disable: false,
    allChunks: true,
  })
  const ExtractGlobal = new ExtractTextPlugin({
    filename: 'stylesheet/stylesGlobal.[contenthash].css',
    disable: false,
    allChunks: true,
  })
  
  
  module.exports = {
    module: {
      rules: [
        /* Local styles */
        {
          test: /\.local\.(css|scss)$/,
          use: ExtractLocal.extract({
            use: [
              {
                loader: 'css-loader',
                options: {
                  sourceMap: true,
                  minimize: true,
                  modules: true,
                  importLoaders: 1,
                  localIdentName: '[local]___[name]__[hash:base64:5]',
                },
              },
             ...
            ],
          }),
        },
        /* Global styles */
        {
          test: /^((?!\.local).)+\.(css)$/,
          use: ExtractGlobal.extract({
            use: [
              {
                loader: 'css-loader',
                options: {
                  sourceMap: true,
                  minimize: true,
                },
              },
            ],
          }),
        },
      ],
    },
    plugins: [
      ExtractLocal,
      ExtractGlobal,
     ...
    ],
  }
  </code></pre>