@@ -323,15 +323,13 @@ async fn this_compilation(
323323
324324#[ plugin_hook( CompilationProcessAssets for CollectShareEntryPlugin ) ]
325325async fn process_assets ( & self , compilation : & mut Compilation ) -> Result < ( ) > {
326- dbg ! ( "process_assets" ) ;
327326 // 遍历图中的 ConsumeSharedModule,收集其 fallback 映射到的真实模块地址
328327 let module_graph = compilation. get_module_graph ( ) ;
329328 let mut ordered_requests: FxHashMap < String , Vec < [ String ; 2 ] > > = FxHashMap :: default ( ) ;
330329 let mut share_scopes: FxHashMap < String , String > = FxHashMap :: default ( ) ;
331330
332- for ( id , module) in module_graph. modules ( ) . into_iter ( ) {
331+ for ( _id , module) in module_graph. modules ( ) . into_iter ( ) {
333332 let module_type = module. module_type ( ) ;
334- dbg ! ( & module_type) ;
335333 if !matches ! ( module_type, rspack_core:: ModuleType :: ConsumeShared ) {
336334 continue ;
337335 }
@@ -342,7 +340,6 @@ async fn process_assets(&self, compilation: &mut Compilation) -> Result<()> {
342340 {
343341 // 从 readable_identifier 中解析 share_scope 与 share_key
344342 let ident = consume. readable_identifier ( & Context :: default ( ) ) . to_string ( ) ;
345- dbg ! ( & ident) ;
346343 // 形如: "consume shared module ({scope}) {share_key}@..."
347344 let ( scope, key) = {
348345 let mut scope = String :: new ( ) ;
@@ -360,11 +357,9 @@ async fn process_assets(&self, compilation: &mut Compilation) -> Result<()> {
360357 }
361358 ( scope, key)
362359 } ;
363-
364360 if key. is_empty ( ) {
365361 continue ;
366362 }
367-
368363 // 收集该 consume 模块的依赖与异步块中的依赖对应的真实模块
369364 let mut target_modules = Vec :: new ( ) ;
370365 for dep_id in consume. get_dependencies ( ) {
0 commit comments