var path = require('path');
var nodeModulesPath = path.resolve(__dirname, 'node_modules');

module.exports = {
    entry: {
        search: path.resolve("./wwwroot/js/views/search/main.jsx"),
        list: path.resolve("./wwwroot/js/views/list/main.jsx")
    },
    output: {
        path: path.resolve("./wwwroot/js/dist/"),
        filename: "[name].js"
    },
    module: {
        loaders: [
            {
                test: /\.jsx?$/,
                loader: "babel-loader",
                query: {
                    presets: ["react", "es2015"]
                },
                exclude: [nodeModulesPath]
            }
        ]
    }
};

@@ -21,16 +21,51 @@
 path');%0A
+var webpack = require(%22webpack%22);%0A%0A
 var node
@@ -119,16 +119,16 @@
 ules');%0A
-
 %0Amodule.
@@ -282,24 +282,216 @@
 in.jsx%22)
+,%0A        vendor: %5B'react', 'material-ui'%5D%0A    %7D,%0A    resolve: %7B%0A        alias: %7B%0A            'react': path.resolve(nodeModulesPath, 'react')%0A        %7D,%0A        extensions: %5B'', '.jsx', '.js'%5D
 %0A    %7D,%0A
     outp
@@ -478,24 +478,25 @@
 js'%5D%0A    %7D,%0A
+%0A
     output: 
@@ -864,17 +864,149 @@
       %5D%0A
-
     %7D
+,%0A    plugins: %5B%0A        new webpack.optimize.CommonsChunkPlugin(/* chunkName= */%22vendor%22, /* filename= */%22vendor.bundle.js%22),%0A    %5D
 %0A%7D;%0A

break out vendors