How can I put multiple TypeScript with Angular2 files into one JS file, for example Rails: precompile?
For example, in the tutorial on the official Angular2 page, you see four .ts files:
- app.component.ts
- boot.ts
- hero.ts
- hero-detail.component.ts
and when you look at the file app.component.ts, you will see the following part:
import {Hero} from './hero';
import {HeroDetailComponent} from './hero-detail.component';
It works great when you compile all .ts files separately, but I would like to concat () them into a single .js file so that there are fewer HTTP requests. I use gulp and tried gulp-concat, which did not work. browserify.
Would anyone help? Thanks in advance.
Yu Su