r/webdev • • Sep 15 '16

Angular 2 Final Released

http://angularjs.blogspot.com/2016/09/angular2-final.html
87 Upvotes

44 comments sorted by

View all comments

4

u/[deleted] Sep 15 '16

I pulled down the last RC and played with their CLI. The generated hello work app had like a 2+MB js bundle, WTF.

typescript is pretty cool, but ng2 still looks way too complicated to me. I prefer how react sticks closer to js.

4

u/2uneek javascript Sep 15 '16

If it was 2mb you weren't doing it right, at ng-conf they built a hello world that was sub 50k...

You should learn the tool, or atleast how it works before you judge it... unless you always just push up unminified, unuglified, dev builds to your servers.. then maybe angular 2 is not for you...

Here's a pretty good blog post on how to get a more optimized build with angular 2 http://blog.mgechev.com/2016/06/26/tree-shaking-angular2-production-build-rollup-javascript/

2

u/NYKHouston43 Sep 15 '16

I am a little curious as to why the gzipped default project made from the angular-cli production build is 189 kB. I thought it was supposed to be 50kB unless I'm missing something.

3

u/2uneek javascript Sep 15 '16

Are you using rollup + tree shaking?

Here is Rob Wormald going over the ~49kb build at ng-conf https://www.youtube.com/watch?v=bSssb9AmiJU&t=26m45s

2

u/NYKHouston43 Sep 15 '16

Ah. Thanks. I'll look into it later.