title: Webpack exclude entries for CommonsChunkPlugin
body: <p>I am trying to set up webpack production configuration. All looks well. However, I realized that while using the commons chunk plugin, it covers all the files in common as expected. What I want to do is, separation of common library modules and common application modules. My config file is :</p>
  
  <pre><code>module.exports = {
    entry: {
      lib: ["react", "react-dom"],
      app: "./ui-v2/app/app.js",
      app2: "./ui-v2/app/app2.js"
    },
    output: {
      path: path.join(__dirname, "target/ui/v2"),
      filename: "/app/[name].[chunkhash].min.js"
    },
    module: {
      loaders: [
        {
          test: /\.js$/,
          exclude: /node_modules/,
          loader: "babel-loader"
        },
        {
          test: /\.(png|jpg|svg)/,
          loader: "file-loader?name=img/[name].[hash].[ext]"
          // loaders: ["url", "image-webpack"]
        },
        {
          test: /\.scss$/,
          loader: ExtractTextPlugin.extract("style-loader", "css-loader!autoprefixer-loader!sass-loader", {
            publicPath: __dirname
          })
        },
        {
          test: /\.(woff|woff2|ttf|eot)$/,
          loader: "file-loader?name=fonts/[name].[hash].[ext]"
        }
      ]
    },
    plugins: [
      clean,
      new webpack.optimize.CommonsChunkPlugin("common", "app/common.[chunkhash].js"),
      new webpack.ProvidePlugin({
        React: "react",
        ReactDOM: "react-dom",
        $: "jquery",
        _: "lodash"
      }),
      new webpack.optimize.UglifyJsPlugin({
        compress: {
        warnings: false
        sourceMap: true
      },
      mangle: {
      except: ["exports", "import", "$", "_", "require", "React", "ReactDOM"]
      }
      }),
      new ExtractTextPlugin("styles/[name].[contenthash].css"),
      new Manifest()
    ]
  }
  </code></pre>
  
  <p>Basically I have 3 modules in the app; app.js, app2.js and a common component user.js.</p>
  
  <p>What I want to achieve is to bundle all library related files like react, react-dom, lodash, etc in a lib bundle, and common application components like user.js in a common bundle. In order to do this, I thought there might be an option to exclude the files that I don't want them to go to "common" file. If I use this output, what is the point for long term caching files for library bundles because whenever I get a common component in my project, they will go into the common bundle and the content hash will be different, but nothing changes in this library files like react, jquery, lodash, etc.</p>
  
  <p>Anyway, what I have at the end of build process is everything still goes into the common bundle and lib has nothing and the file sizes are :</p>
  
  <pre><code>app.&lt;hash&gt;.min.js -&gt; 3.05KB
  app2.&lt;hash&gt;.min.js -&gt; 3.05KB
  lib.&lt;hash&gt;.min.js -&gt; 165 Bytes (has almost nothing!)
  common.&lt;hash&gt;.js -&gt; 678 KB
  </code></pre>
  
  <p>Is there any way to achieve what I want or what would be the best approach to a production build in similar cases? Thank you!</p>