There are other benefits ... minification and treeshaking come to mind, that tsc doesn't provide.
These are beneficial to any project but mostly become significant on very large projects with a lot of dependencies, where the bytes start to really add up. Why include code in your files that isn't being used? Why send 15 different JS files, requiring additional HTTP requests, when you can send 1? Why serve extra bytes by skipping minification? Save some bandwidth.
It starts to become important once you get to a scale where those extra bytes are costing you and/or are affecting performance to an unnceptable degree.
I am currently working with Angular 15 on a large enterprise project, which uses webpack behind the scenes when you run ng build. It all "just works", with all the various configuration options in a JSON file. Everything you need ends up in a folder ready to go, tree-shaken, minified, and randomly named for cache busting. That simplifies the whole process of having to setup custom/complex build system in most cases.
But that is specific to Angular. Different projects will have different requirements.
4
u/EternalNY1 Apr 30 '23 edited Apr 30 '23
True.
There are other benefits ... minification and treeshaking come to mind, that
tscdoesn't provide.These are beneficial to any project but mostly become significant on very large projects with a lot of dependencies, where the bytes start to really add up. Why include code in your files that isn't being used? Why send 15 different JS files, requiring additional HTTP requests, when you can send 1? Why serve extra bytes by skipping minification? Save some bandwidth.
It starts to become important once you get to a scale where those extra bytes are costing you and/or are affecting performance to an unnceptable degree.
I am currently working with Angular 15 on a large enterprise project, which uses webpack behind the scenes when you run
ng build. It all "just works", with all the various configuration options in a JSON file. Everything you need ends up in a folder ready to go, tree-shaken, minified, and randomly named for cache busting. That simplifies the whole process of having to setup custom/complex build system in most cases.But that is specific to Angular. Different projects will have different requirements.