title: Route based code splitting with webpack not working, Chunks not generated
body: <p>I'm trying to implement route based code splitting in my application on a nested route.</p>
  
  <p>I want to break a main routes child routes into a chunk separate from the main chunk.</p>
  
  <h3>mainRoutes.js</h3>
  
  <pre><code>... (other routes)
  {
      path: '/dashboard',
      component: VDClient,
  },
  ... (other routes)
  </code></pre>
  
  <h3>VDClient.js</h3>
  
  <pre><code>const renderVendorDashboard = () =&gt; {
      import(/* webpackChunkName: "vddesktop" */ './Root/index').then(VDApp =&gt; {
          return &lt;VDApp /&gt;
      });
  }
  
  export default class VDClient extends Component {
      render() {
          renderVendorDashboard();
      }
  }
  </code></pre>
  
  <h3>Root/index.js</h3>
  
  <pre><code>import vdRoutes from './vdRoutes'; // file similar to mainRoutes.js but contains the child routes for `/dashboard/` eg: `/dashboard/list`, `/dashboard/add` etc.
  
  class VendorDashboard extends Component {
      componentWillMount() {
          ...
      }
      render() {
          ...
          &lt;div&gt;
              &lt;Switch&gt;
                  {vdRoutes.map(route =&gt; routeWithSubRoutes(route, this.props.match.params, this.props.match.url))}
              &lt;/Switch&gt;
          &lt;/div&gt;
      }
  }
  </code></pre>
  
  <p>After the build completes, I can see all chunks generated except the vddesktop chunk. Am I missing something here??</p>
  
  <p>The other chunks that are generated don't contain the routes or the code of the <code>/dashboard</code> routes, which is the intended behaviour. All the imports are in order so I don't think that should be an issue here.</p>
  
  <p>I've also tried using react-loadable, but that gives me a whole new level of issues unfortunately with webpack 4.</p>
  
  <p>Refer:
  <a href="https://stackoverflow.com/questions/49288130/webpack-4-react-loadable-is-not-spliting-vendor-base-on-chucking-point">webpack 4 react loadable is not spliting vendor base on chucking point</a>
  <a href="https://github.com/jamiebuilds/react-loadable/pull/110" rel="nofollow noreferrer">https://github.com/jamiebuilds/react-loadable/pull/110</a></p>
  
  <p>Please let me know if I can provide some more info that might be helpful in solving this problem. It would be a huge help.</p>