I finished angular2 tour of heroes . And I wonder what if I would like to build this project for production. I want to add only 2 files in index.html : appScripts.js and vendorScripts.js . I compiled ts files with outFile parameter, so I have appScripts.js , but it does not work. Here is the code in my gulpfile:
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')); });
I think because we loaded some angular models, such as @angular/core in the ts project files, and because of some systemjs stuff ..
Are there any solutions?
source share