Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

支持分包按需加载 #11

Open
famanoder opened this issue Oct 18, 2024 · 1 comment
Open

支持分包按需加载 #11

famanoder opened this issue Oct 18, 2024 · 1 comment

Comments

@famanoder
Copy link
Contributor

No description provided.

@famanoder famanoder added this to Plan Oct 18, 2024
@famanoder famanoder converted this from a draft issue Oct 18, 2024
@famanoder
Copy link
Contributor Author

考虑一种情况,比如我们项目有 5 大模块,每一个模块相对独立使用到的图标数量大概有两三百个,如果把所有图标打包到一起的话,当用户使用一个模块时,加载了 80% 不属于这个模块的图标,存在大量的冗余;
思考一下如何做到按页面或者模块的维度做到按需加载?大概有三种思路,重要但不紧急,继续思考思考吧!

  1. 按目录划分,每个目录的图标单独打包
  2. 使用文件名加前缀的方式划分不同种类,分别打包到一起
  3. 按页面的维度,遍历依赖的文件,将其中使用到的图标打包到一起

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant