title: How to build angular2 app for production
body: <p>I've complete the <code>angular2 tour of heroes</code>. And I wonder what if I'd like to build this project for production. I want to add only 2 files to <code>index.html</code>: <code>appScripts.js</code> and <code>vendorScripts.js</code>. 
  I've compiled my <code>ts</code> files with option <code>outFile</code> so I have my <code>appScripts.js</code> but it doesn't work. Here is some code in my gulpfile: </p>
  
  <pre><code>gulp.task('compile', ['clean'], function() {
  
      var tsProject = typescript.createProject('tsconfig.json', {
          outFile: 'app.js'
      });
  
      var tsResult = gulp.src(['app/**/*.ts'])
          .pipe(typescript(tsProject));
      return tsResult.js
          .pipe(gulp.dest('./dist'));
  });
  </code></pre>
  
  <p>I think it's because, we have loaded some angular models like <code>@angular/core</code> in project <code>ts</code> files, and because of some systemjs stuff..</p>
  
  <p>Is there any solutions?</p>