@@ -9,6 +9,7 @@ use crate::{
99 finish_make:: finish_make_pass, finish_module_graph:: finish_module_graph_pass,
1010 make:: make_hook_pass, pass:: PassExt ,
1111 } ,
12+ logger:: Logger ,
1213} ;
1314
1415/// Composite pass for the entire Build Module Graph phase.
@@ -41,20 +42,16 @@ impl PassExt for BuildModuleGraphPhasePass {
4142 _cache : & mut dyn Cache ,
4243 ) -> Result < ( ) > {
4344 let plugin_driver = compilation. plugin_driver . clone ( ) ;
44-
45- // Sub-phase: make hook
45+ let logger = compilation. get_logger ( "rspack.Compiler" ) ;
46+ // align with webpack, make hook include build_module_graph phase in webpack
47+ let start = logger. time ( "make hook" ) ;
4648 make_hook_pass ( compilation, plugin_driver. clone ( ) ) . await ?;
47-
48- // Sub-phase: build module graph
4949 build_module_graph_pass ( compilation) . await ?;
50+ logger. time_end ( start) ;
5051
51- // Sub-phase: finish make
52- finish_make_pass ( compilation, plugin_driver. clone ( ) ) . await ?;
53-
54- // Sub-phase: finish module graph
52+ finish_make_pass ( compilation, plugin_driver) . await ?;
5553 finish_module_graph_pass ( compilation) . await ?;
5654
57- // Add checkpoint if incremental build is enabled
5855 use crate :: incremental:: IncrementalPasses ;
5956 if compilation
6057 . incremental
0 commit comments