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