title: Why is webpack code splitting not working for me?
body: <p>I'm using require.ensure to create split points at <strong>react-router</strong> paths. However, my build directory still only has <code>app.js</code> in addition to the <code>vendor.js</code>. I was expecting a separate js file for each path I used <code>require.ensure</code>.  </p>
  
  <p>I used <code>require.ensure</code> at each path like this:</p>
  
  <pre><code>&lt;Route path= 'auth' getComponent={(nextState, callback) =&gt; {
    require.ensure([], (require) =&gt; {
      callback(null, require('containers/Authenticate/AuthenticateContainer.js').default)
    }, 'auth')
  }}/&gt;
  </code></pre>
  
  <p>my web pack config output for build looks like this: </p>
  
  <pre><code>output: {
    path: PATHS.build,
    filename: '/[name].[chunkhash].js',
    chunkFilename: '/[chunkhash].js'
  }
  </code></pre>
  
  <p>Here are the gists of my <a href="https://gist.github.com/jasan-s/8c17d5bd7bdf63de1c82f21221827a08" rel="nofollow">route file</a> and my <a href="https://gist.github.com/jasan-s/1514be3b792cf75a5724292b1fa98951" rel="nofollow">webpack config file</a> in their entirety.  </p>
  
  <p><strong>UPDATE:</strong>   I figured out what I was doing wrong. My project structure for containers is like so:</p>
  
  <pre><code>-app
   -containers
     -containerA.
       -containerA.js
     -containerB
       -containerB.js
     -containerC
       -containerC.js
     -index.js
  </code></pre>
  
  <p>The issue: I was still exporting the containers I was requiring in routes file like so: export containerB from './containerB/containerB'
  Removing the export in the index.js and requiring straight from the containerB.js did the trick.</p>