How to Speed up the First time loading time Angular 6 Application

前端 未结 4 1496
遥遥无期
遥遥无期 2021-02-01 10:48

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,

i have tried with -

4条回答
  •  無奈伤痛
    2021-02-01 11:28

    Since you already used --prod mode, next best options that i know are :

    1. If possible split the single module into a bunch of smaller feature modules and lazy load them.
    2. Remove unnecessary scripts and styles from index.html and load it at component levels.

提交回复
热议问题