PatrickJS / NG6-starter

:ng: An AngularJS Starter repo for AngularJS + ES6 + Webpack
https://angularclass.github.io/NG6-starter
Apache License 2.0
1.91k stars 1.35k forks source link

Size of vendor.bundle.js is quite large #143

Closed the-fool closed 7 years ago

the-fool commented 8 years ago

Even after uglification, the size of the vendor.bundle.js is 293 kB. Is this right? I know there are polyfills and such added on -- but I feel like something is wrong.

If ~300kB is the baseline for a Babel + Angular app, what can be done to lighten the load?

fesor commented 8 years ago

This starter includes babel-polyfill by default, but you can remove it and import only those polyfils that you need.

Baseline for babel + angular + uglifyjs is + gzip ~60Kb for vendor.bundle.js. This is without polyfils and uiRouter.

fesor commented 8 years ago

@the-fool please let me know if you solved problem.

phil-lgr commented 8 years ago

@fesor could you explain how to remove it properly ? I am new with ES6 and Babel.

the-fool commented 8 years ago

Yes - very much! Thank you for the kind help.

fesor commented 8 years ago

Search for babel-polyfil in gulpfile and just remove it. Also check this: https://github.com/zloirock/core-js#commonjs

phil-lgr commented 8 years ago

Yes I saw it yesterday night! Thank you for pointing it out.