Skip to content

Commit

Permalink
refactor: 🔥 enter ensure 使用 chunk sync dep 减少首屏 chunk 数量 (#1707)
Browse files Browse the repository at this point in the history
  • Loading branch information
stormslowly authored Nov 29, 2024
1 parent c140972 commit 89d7c53
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/mako/src/plugins/central_ensure.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use std::collections::BTreeMap;
use std::iter::once;
use std::sync::Arc;

use anyhow::anyhow;
Expand Down Expand Up @@ -32,8 +33,9 @@ pub fn module_ensure_map(context: &Arc<Context>) -> anyhow::Result<BTreeMap<Stri
.iter()
.for_each(|chunk| {
let deps_chunks = cg
.installable_descendants_chunk(&chunk.id)
.sync_dependencies_chunk(&chunk.id)
.iter()
.chain(once(&chunk.id))
.map(|chunk_id| chunk_id.generate(context))
.collect::<Vec<_>>();

Expand Down

0 comments on commit 89d7c53

Please sign in to comment.