title: How do I do code splitting with webpack on angular 2 app?
body: <p>I have an app structure like this:</p>
  
  <pre><code>├── /dashboard
  │   ├── dashboard.css
  │   ├── dashboard.html
  │   ├── dashboard.component.ts
  │   ├── dashboard.service.ts
  │   ├── index.ts
  ├── /users
  │   ├── users.css
  │   ├── users.html
  │   ├── users.component.ts
  │   ├── users.service.ts
  │   ├── index.ts
  ├── /login
  │   ├── login.css
  │   ├── login.html
  │   ├── login.component.ts
  │   ├── login.service.ts
  │   ├── index.ts
  ├── app.component.ts
  ├── app.module.ts
  ├── app.routes.ts
  ├── app.styles.css
  </code></pre>
  
  <p>And I want to code split my app into something like this:</p>
  
  <pre><code>├── dashboard.js
  ├── users.js
  ├── login.js
  ├── app.js
  </code></pre>
  
  <p>I cannot seem to find an example of how I can do this with webpack. So 2 questions. Can this be done? And, How can this be done?</p>
  
  <p>Any leads or help would be appreciated. I have been researching this all morning.</p>
  
  <p>Angular documentation suggests it <a href="https://angular.io/features.html#!#sts=Code%20splitting" rel="nofollow">here</a>, but no examples or tutorials that I can find. So it's possible, yet no one know how to do it?.</p>
  
  <p>you can find the webpack configuration <a href="https://github.com/AngularClass/angular2-webpack-starter/tree/master/config" rel="nofollow">here</a></p>