diff --git a/crates/next-api/src/app.rs b/crates/next-api/src/app.rs index d04c71bc56d39..438527a5a2cce 100644 --- a/crates/next-api/src/app.rs +++ b/crates/next-api/src/app.rs @@ -1459,7 +1459,6 @@ impl AppEndpoint { entry_name: app_entry.original_name.clone(), client_references, client_references_chunks, - rsc_app_entry_chunks: app_entry_chunks, client_chunking_context, ssr_chunking_context, async_module_info: module_graphs.full.async_module_info().to_resolved().await?, diff --git a/crates/next-core/src/next_manifests/client_reference_manifest.rs b/crates/next-core/src/next_manifests/client_reference_manifest.rs index 8fea01b2a3fdf..ea684e83af780 100644 --- a/crates/next-core/src/next_manifests/client_reference_manifest.rs +++ b/crates/next-core/src/next_manifests/client_reference_manifest.rs @@ -15,7 +15,7 @@ use turbopack_core::{ asset::{Asset, AssetContent}, chunk::{ChunkingContext, ModuleChunkItemIdExt, ModuleId as TurbopackModuleId}, module_graph::async_module_info::AsyncModulesInfo, - output::{OutputAsset, OutputAssets}, + output::OutputAsset, virtual_output::VirtualOutputAsset, }; use turbopack_ecmascript::utils::StringifyJs; @@ -37,7 +37,6 @@ pub struct ClientReferenceManifestOptions { pub entry_name: RcStr, pub client_references: ResolvedVc, pub client_references_chunks: ResolvedVc, - pub rsc_app_entry_chunks: ResolvedVc, pub client_chunking_context: ResolvedVc>, pub ssr_chunking_context: Option>>, pub async_module_info: ResolvedVc, @@ -58,7 +57,6 @@ impl ClientReferenceManifest { entry_name, client_references, client_references_chunks, - rsc_app_entry_chunks, client_chunking_context, ssr_chunking_context, async_module_info, @@ -100,7 +98,6 @@ impl ClientReferenceManifest { } = &*client_references_chunks.await?; let client_relative_path = &*client_relative_path.await?; let node_root_ref = &*node_root.await?; - let rsc_app_entry_chunks = &*rsc_app_entry_chunks.await?; let client_references_ecmascript = client_references .await? @@ -167,10 +164,6 @@ impl ClientReferenceManifest { ResolvedVc>, ReadRef, > = FxHashMap::default(); - let mut rsc_chunk_path_cache: FxHashMap< - ResolvedVc>, - ReadRef, - > = FxHashMap::default(); for (client_reference_module, client_reference_module_ref) in client_references_ecmascript @@ -266,32 +259,10 @@ impl ClientReferenceManifest { (Vec::new(), false) }; - let (rsc_chunks_paths, rsc_is_async) = if runtime == NextRuntime::Edge { - // the chunks get added to the middleware-manifest.json instead - // of this file because the - // edge runtime doesn't support dynamically - // loading chunks. - (Vec::new(), false) + let rsc_is_async = if runtime == NextRuntime::Edge { + false } else { - let rsc_chunks_paths = cached_chunk_paths( - &mut rsc_chunk_path_cache, - rsc_app_entry_chunks.iter().copied(), - ) - .await?; - - let chunk_paths = rsc_chunks_paths - .filter_map(|(_, chunk_path)| { - node_root_ref - .get_path_to(&chunk_path) - .map(ToString::to_string) - }) - .map(RcStr::from) - .collect::>(); - - let is_async = - async_modules.contains(&ResolvedVc::upcast(client_reference_module)); - - (chunk_paths, is_async) + async_modules.contains(&ResolvedVc::upcast(client_reference_module)) }; entry_manifest.client_modules.module_exports.insert( @@ -326,7 +297,7 @@ impl ClientReferenceManifest { ManifestNodeEntry { name: "*".into(), id: (&*rsc_chunk_item_id).into(), - chunks: rsc_chunks_paths, + chunks: vec![], r#async: rsc_is_async, }, );