angular - Why apps built with Angular2 are so heavy? -
recently planned revamp our existing web-app built in jmvc
. , decided go angular-2.
and test load size, did following:
ng new test123 cd test123 ng build -prod
and deployed dist
folder content on apache , showed 1.0mb transferred
.
my entire jmvc application, business logic hardly 1.2mb when loaded in browser.
what can decrease size of angular-2 app after deployment?
as per comments, ng2 team working on reducing size of framework nearing release.
prior this, following typical http conventions minimising js size main thing, i've found webpacks optimisations heavily reduce size of generated js substantially.
thats 313kb entire angular2 code base entire app includes inline html , styling (i'm not sure result hello world example though).
the webpack plugins can use
webpack.optimize.occurenceorderplugin(true) webpack.optimize.uglifyjsplugin() webpack.optimize.dedupeplugin()
hope helps!
Comments
Post a Comment