Skip to content

Commit

Permalink
Remove hack of select_part
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Oct 2, 2024
1 parent df3fcdb commit c7a6860
Showing 1 changed file with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ use turbopack_core::{
reference_type::{EcmaScriptModulesReferenceSubType, ReferenceType},
source::Source,
};
use turbopack_ecmascript::{
chunk::EcmascriptChunkPlaceable, tree_shake::asset::EcmascriptModulePartAsset,
EcmascriptModuleAsset,
};
use turbopack_ecmascript::chunk::EcmascriptChunkPlaceable;

use super::ecmascript_client_reference_proxy_module::EcmascriptClientReferenceProxyModule;

Expand Down Expand Up @@ -80,7 +77,7 @@ impl Transition for NextEcmascriptClientReferenceTransition {
} else {
source
};
let mut client_module = this
let client_module = this
.client_transition
.process(client_source, module_asset_context, reference_type.clone())
.module();
Expand All @@ -90,13 +87,6 @@ impl Transition for NextEcmascriptClientReferenceTransition {
.process(source, module_asset_context, reference_type)
.module();

if let (Some(full), Some(part)) = (
Vc::try_resolve_downcast_type::<EcmascriptModuleAsset>(client_module).await?,
part,
) {
client_module = EcmascriptModulePartAsset::select_part(full, part);
}

let Some(client_module) =
Vc::try_resolve_sidecast::<Box<dyn EcmascriptChunkPlaceable>>(client_module).await?
else {
Expand Down

0 comments on commit c7a6860

Please sign in to comment.