title: Webpack: How to add a folder of JS files to the bundler
body: <p>I have a react application that I'm developing and I'm not too familiar with webpack.  I've implemented a bootstrap theme with some custom JavaScript and it works fine when I link all the scripts manually in my <code>index.html</code> body.</p>
  
  <p>The hack method is quite messy and gives me less control later when it comes to minifying all the scripts.</p>
  
  <p>All my scripts are in a single folder called <code>vendor</code> located in <code>src</code>. How can I bundle all the files in the <code>vendor</code> folder with the other stuff that is bundled with webpack?</p>
  
  <p>Here's my webpack file for reference:</p>
  
  <pre><code>const debug = process.env.NODE_ENV !== "production"
  const webpack = require('webpack')
  const ExtractTextPlugin = require("extract-text-webpack-plugin")
  const path = require('path')
  const loaders = require('./webpack.loaders')
  
  module.exports = {
      context: path.resolve(__dirname, "src"),
      resolve: {
          root: [ path.resolve(__dirname, "src")],
          extensions: ['', '.js', '.jsx']
      },
      devtool: debug ? "inline-sourcemap" : null,
      entry: "./js/client.js",
      module: {
          loaders: loaders.concat([
              {
                  test: /\.js?$/,
                  exclude: /(node_modules|bower_components)/,
                  loader: 'babel-loader',
                  query: {
                      presets: ['react', 'es2015', 'stage-0'],
                      plugins: ['react-html-attrs', 'transform-class-properties', 'transform-decorators-legacy']
                  }
              }
          ])
      },
      output: {
          path: __dirname + "/src/",
          filename: "client.min.js"
      },
      plugins:
          debug ? [] : [
              new webpack.optimize.DedupePlugin(),
              new webpack.optimize.OccurenceOrderPlugin(),
              new webpack.optimize.UglifyJsPlugin({ mangle: false, sourcemap: false })
          ]
  }
  </code></pre>