angular2-cli - How to pack some specific ts files into one js file?

48 Views Asked by At

I'm working on a small angular2 project that is generated by angular2-cli

Now I need to public my common library (in common folder), and for security reason, I want to pack it into one js file (along with minify source code).

After hours of researching, it seems that I can not build only some specific ts files with angular2-cli (using webpack).

How can I do to reach my target in this case? And, can gulp help me?

enter image description here

Thanks for your help!

1

There are 1 best solutions below

0
On

In my case, I solved it by directly using gulp inside my angular2-cli project. I added the gulpfile.ts and the necessary files, then, configured them to make gulp work.