Reputation: 548
After building angular 7 project our main.*.js file size is 8.8 mb. We are already using gzip compression.Can you suggest how can we reduce its size so that it doesn't take more time to load?
Upvotes: 0
Views: 966
Reputation: 71
build with aot mode:ng build --aot
or
ng build --prod
more in cli docs
see also the new Angular engine (in recent versions): ivy
Upvotes: 1
Reputation: 24404
you need to divide you components to modules then use module lazy loading this will take these component source to single module and loaded separably from main.*.js
Upvotes: 1