@@ -18,7 +18,7 @@ use rspack_core::{
1818 ParserOptions , Plugin , PrefetchExportsInfoMode , RuntimeGlobals , get_target, is_esm_dep_like,
1919 rspack_sources:: { ReplaceSource , Source } ,
2020} ;
21- use rspack_error:: Result ;
21+ use rspack_error:: { Diagnostic , Result } ;
2222use rspack_hook:: { plugin, plugin_hook} ;
2323use rspack_plugin_javascript:: {
2424 JavascriptModulesRenderChunkContent , JsPlugin , RenderSource ,
@@ -303,7 +303,11 @@ async fn concatenation_scope(
303303}
304304
305305#[ plugin_hook( CompilationAfterCodeGeneration for EsmLibraryPlugin ) ]
306- async fn after_code_generation ( & self , compilation : & mut Compilation ) -> Result < ( ) > {
306+ async fn after_code_generation (
307+ & self ,
308+ compilation : & Compilation ,
309+ diagnostics : & mut Vec < Diagnostic > ,
310+ ) -> Result < ( ) > {
307311 let mut chunk_ids_to_ukey = FxHashMap :: default ( ) ;
308312
309313 for chunk_ukey in compilation. chunk_by_ukey . keys ( ) {
@@ -316,7 +320,7 @@ async fn after_code_generation(&self, compilation: &mut Compilation) -> Result<(
316320
317321 * self . chunk_ids_to_ukey . borrow_mut ( ) = chunk_ids_to_ukey;
318322
319- self . link ( compilation) . await ?;
323+ self . link ( compilation, diagnostics ) . await ?;
320324 Ok ( ( ) )
321325}
322326
0 commit comments