File tree 1 file changed +11
-9
lines changed
turbopack/crates/turbopack-core/src/module_graph
1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -406,15 +406,17 @@ pub async fn compute_merged_modules(module_graph: Vc<ModuleGraph>) -> Result<Vc<
406
406
|parent_info, node, _| {
407
407
let module = node. module ;
408
408
409
- if let Some ( ( parent, r) ) = parent_info {
410
- let same_bitmap = module_merged_groups. get ( & parent. module ) . unwrap ( )
411
- == module_merged_groups. get ( & module) . unwrap ( ) ;
412
-
413
- if !same_bitmap || matches ! ( r. export, ExportUsage :: All ) {
414
- // A reference from another group or a namespace import, this module
415
- // needs to be exposed.
416
- exposed_modules. insert ( module) ;
417
- }
409
+ if parent_info. is_none_or ( |( parent, r) | {
410
+ ( module_merged_groups. get ( & parent. module ) . unwrap ( )
411
+ != module_merged_groups. get ( & module) . unwrap ( ) )
412
+ || matches ! ( r. export, ExportUsage :: All )
413
+ } ) {
414
+ // This module needs to be exposed:
415
+ // - referenced from another group or
416
+ // - a namespace import or an entry module or
417
+ // - an entry module (TODO assume it will be required, but currently we
418
+ // don't know if that is actually true),
419
+ exposed_modules. insert ( module) ;
418
420
}
419
421
} ,
420
422
)
You can’t perform that action at this time.
0 commit comments