var webpack = require("webpack");
var BowerWebpackPlugin = require('bower-webpack-plugin');
var minimize = process.argv.indexOf('--minimize') !== -1;
var plugins = [];
plugins.push(new BowerWebpackPlugin({
    modulesDirectories: ["vendors"],
    manifestFiles: "bower.json",
    excludes: /.*\.less/
}));
plugins.push(new webpack.ProvidePlugin({
            'window.jQuery': 'jquery',
            'window.$': 'jquery',
            jQuery:'jquery',
            $:'jquery'
}));

if(minimize){
    plugins.push(new webpack.optimize.UglifyJsPlugin({      include: /\.min\.js$/ , minimize: true }));
}



module.exports = {
    entry: "./src/vendors.js",
    output: {
        path: "./production/js/",
        filename: minimize ?"vendors.min.js": "vendors.js"
    },
    devtool:'source-map',
    module: {
        loaders: [
            { test: /\.css$/, loader: "style!css" },
            { test: /\.(woff|svg|ttf|eot)([\?]?.*)$/, loader: "file-loader?name=[name].[ext]" }
        ]
    },
    plugins: plugins
};
@@ -545,18 +545,18 @@
 (%7B      
-in
+ex
 clude: /
@@ -624,16 +624,27 @@
  entry: 
+%7B%22vendors%22:
 %22./src/v
@@ -653,16 +653,17 @@
 dors.js%22
+%7D
 ,%0A    ou
@@ -701,16 +701,24 @@
 tion/js/
+vendors/
 %22,%0A     
@@ -741,23 +741,22 @@
 imize ?%22
-vendors
+%5Bname%5D
 .min.js%22
@@ -756,16 +756,52 @@
 min.js%22:
+ %22%5Bname%5D.js%22,%0A        chunkFilename:
  %22vendor
@@ -802,16 +802,22 @@
 vendors.
+chunk.
 js%22%0A    

modify : web config