title: Is it possible to dynamically create an entry point for each folder in the webpack config?
body: <p>This is my current folder structure:  </p>
  
  <pre><code>-- src
     -- js
        -- page 1
           -- index.js
           -- actions
           -- components
           -- reducers
        -- page 2
           -- index.js
           -- actions
           -- components
           -- reducers
        -- page 3
           -- index.js
           -- actions
           -- components
           -- reducers
  </code></pre>
  
  <p>And this is my webpack.config.js:  </p>
  
  <pre><code>module.exports = {
      entry: {
          page1: './src/js/page1/index.js',
          page2: './src/js/page2/index.js',
          page3: './src/js/page3/index.js',
      },
      output: {
          path: './assets/javascripts',
          publicPath: '/assets/',
          filename: '[name].js'
      }
  }
  </code></pre>
  
  <p>So every time I create a new page, I have to add another line in my entry object. This may get very big and very messy.  </p>
  
  <p>So is there a way to just have webpack loop through all the folders in the /src/js/ folder and automatically make the index.js in the corresponding folder the entry point?  </p>