text: //var CommonsChunkPlugin = require("webpack/lib/optimize/CommonsChunkPlugin");
  var webpack = require('webpack')
  module.exports = {
    entry: {
      bundle1: './main1.jsx',
      bundle2: './main2.jsx'
    },
    output: {
      filename: '[name].js'
    },
    module: {
      loaders:[
        { test: /\.js[x]?$/, exclude: /node_modules/, loader: 'babel-loader?presets[]=es2015&presets[]=react' },
      ]
    },
    plugins: [
      //new CommonsChunkPlugin('init.js')
      new webpack.optimize.CommonsChunkPlugin({
        name: 'vendors', // 公共模块的名称
        chunks: ['bundle1','bundle2'],  // chunks是需要提取的模块
        minChunks: 2
      }),
    ]
  }
  