vendor.********.bundle.js size is too large in production
OS?
Mac OSX (Yosemite)
Versions.
1.0.0-beta.24
My App Repo
https://github.com/AungMyoKyaw/NightlifeCoordinationApp
ng build --prod --aot vendor.**.bundle.js size is still too large. angular-cli compress this file for production but it does not remove comment. is there options for this ? please
angular 5 and their cli create much smaller files, although in my case it took more time to build but the size was really small (even no vendor created anymore).
Try this out:
ng build -prod -aot --buildOptimizer
@pacurtin @maapteh @hansl @deebloo My vendor bundle.js is 3.45 MB. How can i reduce it to keep under 2 MB.
I've used - ng build -prod -aot --buildOptimizer
👍 1
1: Don't use unnecessary imports
2: Keep track the size of the modules,
3: ng build -prod -aot --buildOptimizer like the @pacurtin say ^^
4: I am not sure about the comments but inline SVG can increase the size
Just a quick note: ng build --prod is equivalent to ng build --prod --aot --buildOptimizer
Also, ng build --prod does not generate a vendor bundle by default.
Any luck in 2018 guys ? I am getting vector bundle of 3MB even after ng build --prod --aot --buildOptimizer (seems to be similar to ng build --prod). My site is too slow !
@dssagar93 If your site is slow in production try something like https://www.webpagetest.org/ and make sure your server has gzip enabled.
With gzip enabled my main.js went from 5.5mb to 1.4mb
I'm also going to try splitting my app into sub modules as detailed here: https://malcoded.com/posts/angular-fundamentals-modules
That way users will lazy-load some parts of my app and won't have such a big download when all they really need to see at first is a login page or a home page.
I have GZIP already enabled. I don't know what is causing the issue. When I check the network tab in Chrome dev tools there is a long idle time of around 8 seconds while loading the site. I dont understand what that idle time is for !
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.