如何加快首次加载时间Angular 6应用 [英] How to Speed up the First time loading time Angular 6 Application
本文介绍了如何加快首次加载时间Angular 6应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在最终部署文件超过8 Mb之后,我已经完全在单个模块中创建了Angular Application,因此对于第一次加载时间来说太慢了,
I have created Angular Application in single module fully, after final deploy files are more than 8 Mb so for First time loading time is too slow,
我现在尝试使用--prod文件大小约为5MB
i have tried with --prod now the file size is around 5MB
还有没有其他可能加快速度?
is there any other possible to speed up
推荐答案
由于您已经使用--prod模式,因此我所知道的下一个最佳选择是:
Since you already used --prod mode, next best options that i know are :
- 如果可能,将单个模块拆分为一堆较小的功能模块,然后延迟加载它们.
- 从index.html删除不必要的脚本和样式,并将其加载到组件级别.
这篇关于如何加快首次加载时间Angular 6应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文