Skip to content

Commit 5914415

Browse files
committed
Use correct ChunkGroups for chunking
1 parent 0da8476 commit 5914415

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

crates/next-api/src/app.rs

+16-5
Original file line numberDiff line numberDiff line change
@@ -1658,16 +1658,14 @@ impl AppEndpoint {
16581658
}
16591659
}
16601660
NextRuntime::NodeJs => {
1661-
let mut evaluatable_assets = this.app_project.rsc_runtime_entries().owned().await?;
1662-
16631661
let Some(rsc_entry) = ResolvedVc::try_downcast(app_entry.rsc_entry) else {
16641662
bail!("rsc_entry must be evaluatable");
16651663
};
16661664

1667-
evaluatable_assets.push(server_action_manifest_loader);
1665+
let mut evaluatable_assets = this.app_project.rsc_runtime_entries().owned().await?;
16681666
evaluatable_assets.push(rsc_entry);
16691667

1670-
let entry_chunk_group = *module_graph
1668+
let entry_chunk_group_idx = *module_graph
16711669
.chunk_group_info()
16721670
.get_index_of(ChunkGroup::Entry {
16731671
entries: vec![ResolvedVc::upcast(rsc_entry)],
@@ -1696,7 +1694,7 @@ impl AppEndpoint {
16961694
)
16971695
.with_modifier(server_utils_modifier()),
16981696
ChunkGroup::SharedMerged {
1699-
parent: entry_chunk_group,
1697+
parent: entry_chunk_group_idx,
17001698
merge_tag: NEXT_SERVER_UTILITY_MERGE_TAG.clone(),
17011699
entries: server_utils,
17021700
},
@@ -1754,6 +1752,19 @@ impl AppEndpoint {
17541752
.await?;
17551753
}
17561754

1755+
current_chunks = current_chunks
1756+
.concatenate(chunking_context.chunk_group_assets(
1757+
server_action_manifest_loader.ident(),
1758+
ChunkGroup::Entry {
1759+
entries: vec![ResolvedVc::upcast(server_action_manifest_loader)],
1760+
ty: ChunkGroupType::Entry,
1761+
},
1762+
module_graph,
1763+
Value::new(current_availability_info),
1764+
))
1765+
.resolve()
1766+
.await?;
1767+
17571768
anyhow::Ok(Vc::cell(vec![
17581769
chunking_context
17591770
.entry_chunk_group_asset(

0 commit comments

Comments
 (0)