Skip to content

【Angular】包的加载速度优化 #151

Description

@deepthan

问题: angular的包太大了,导致加载时间很长,怎么优化呢?

1. 懒加载 + build 优化

  • 懒加载
    模块配置懒加载:把应用分成很多个小模块,每次只加载对应的模块。
  • 预加载
    模块配置预加载:加载完懒加载模块之后再把其他模块加载进来。
  • build优化
    aot优化

2. web容器开启gzip

3. 参考网站ngx-admin进行优化

ngx-admin

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions