title: How to enable tree-shaking for a new Angular 4 project
body: <p>I just created a new Angular 4 project with the CLI: <code>ng new test</code></p>
  
  <p>The versions: </p>
  
  <pre><code>@angular/cli: 1.0.0
  node: 6.10.0
  os: win32 x64
  @angular/common: 4.0.1
  @angular/compiler: 4.0.1
  @angular/core: 4.0.1
  @angular/forms: 4.0.1
  @angular/http: 4.0.1
  @angular/platform-browser: 4.0.1
  @angular/platform-browser-dynamic: 4.0.1
  @angular/router: 4.0.1
  @angular/cli: 1.0.0
  @angular/compiler-cli: 4.0.1
  </code></pre>
  
  <p>However, tree-shaking is not working correctly, as my unused class <code>FooBar</code> is still in the <code>main.*.js</code> file. </p>
  
  <p>My sample component TS file (FooBar should not be in the output): </p>
  
  <pre><code>import { Component } from '@angular/core';
  
  @Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css']
  })
  export class AppComponent {
    title = 'app works!';
  }
  
  export class FooBar {
    foo = "hello";
  }
  </code></pre>
  
  <p>I tried to use rollup (like described in the docs) but this didn't work as well...</p>
  
  <p>Is there a simple way to enable tree-shaking? (I expected it to be enabled by default when creating a project via CLI). </p>
  
  <p><strong>Update:</strong> I'm using <code>ng build --prod</code> and it's still not shaked..</p>