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

fix: do not split root module for async chunks #929

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

PeachScript
Copy link
Member

不对 async chunk 的根模块做 Code Splitting,在拆分行为上和 Webpack 保持一致,举个例子说明 PR 前后的区别:

如果模块 a 同时被 await import 和被另一 async module import 引入,在 PR 前是概率性被拆分为独立的 async chunk 或 common(默认的 splitGroup,提取 async chunk 的依赖),在 PR 后是稳定拆分为独立的 async chunk

改动原因:实际业务中可能会出现页面组件之间相互引用的情况,不改的话就有可能出现页面组件被拆到 common 里的情况,和我们预期的按路由维度按需加载的行为不一致

@sorrycc sorrycc merged commit 4a4956d into master Mar 12, 2024
8 checks passed
@delete-merged-branch delete-merged-branch bot deleted the hotfix/skip-split-async-root-module branch March 12, 2024 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants