title: Webpack: Create a bundle with each file in directory
body: <p>I am trying to bundle every angular module in webpack. My target is to have one app.js that will be bundled by webpack with this configuration:</p>
  
  <pre><code>entry: {
          app: "./app/app.js"
  },
  output: {
          path: "./build/ClientBin",
          filename: "bundle.js"
  },
  </code></pre>
  
  <p>I will place this bundle script in my index.html so it will entry point of my app.
  Also I have many modules in <code>./app/components</code> folder. Folder structure in like:</p>
  
  <pre><code>app
  |--components
  |  |
  |  |--home
  |  |  |
  |  |  |--home.html
  |  |  |--home.js
  |--app.js
  |--AppController.js
  </code></pre>
  
  <p>I have required <code>home.html</code> in <code>home.js</code> so when I load <code>home.js</code> all of its needed files will load.
  The problem is I have several components like <code>home</code> and I want to tell webpack to bundle each component separately and name it with its containing folder like <code>home</code>.</p>
  
  <p>How can I config webpack to create these bundles and put them in <code>./build/components</code>?</p>