-
Notifications
You must be signed in to change notification settings - Fork 85
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
fix: codespliting mode auto may miss chunk connection to urlMap #1311
Conversation
摘要概述这次更新涉及多个文件的更改,主要集中在优化模块合并和连接块功能上,以及增强了代码拆分机制的验证过程。 更改
诗歌
Note Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://coderabbit.ai TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
这个一整个循环 + 后面的移除的 modules 是不提取成一个 chunk graph 上的 方法, chunk_graph.mergeToEntry(...) 在语义上会跟明显点 PS
|
@@ -197,6 +197,25 @@ impl ChunkGraph { | |||
self.graph.remove_node(idx); | |||
} | |||
|
|||
pub fn remove_and_connect_outgoing_to_chunk(&mut self, chunk_id: &ChunkId, from: &ChunkId) { | |||
let idx = self.id_index_map.remove(chunk_id).unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不要 unwrap
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
以后不同的功能提不同的 PR
bug 触发条件:
a dynamic import b
b dynamic import c
将之前添加孤立节点的调用移除, 添加新的判断方式, 在 remove chunk 的时候检查所有的 outgoing 节点是否 包含 outgoing 边
Summary by CodeRabbit
新功能
界面变更
index.ts
文件中,添加了两个模块should-be-merged-outgoting
和should-not-be-merged
的导入语句。.a
的新文件a.less
。性能优化