File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -1072,6 +1072,8 @@ Arguments:
10721072		benchmark . before ( ) ; 
10731073		await  this . #initWatchDependencies( ) ; 
10741074		benchmark . after ( ) ; 
1075+ 
1076+ 		eventBus . on ( "eleventyDevServer.rebuild" ,  async  ( )  =>  await  this . _watch ( ) ) ; 
10751077	} 
10761078
10771079	// fetch from project’s package.json 
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import debugUtil from "debug";
44import  {  Merge ,  DeepCopy ,  TemplatePath  }  from  "@11ty/eleventy-utils" ; 
55
66import  EleventyBaseError  from  "./Errors/EleventyBaseError.js" ; 
7+ import  EventBus  from  "./EventBus.js" ; 
78import  ConsoleLogger  from  "./Util/ConsoleLogger.js" ; 
89import  PathPrefixer  from  "./Util/PathPrefixer.js" ; 
910import  checkPassthroughCopyBehavior  from  "./Util/PassthroughCopyBehaviorCheck.js" ; 
@@ -181,6 +182,10 @@ class EleventyServe {
181182		// Static method `getServer` was already checked in `getServerModule` 
182183		this . _server  =  serverModule . getServer ( "eleventy-server" ,  this . outputDir ,  this . options ) ; 
183184
185+     if  ( "setEventBus"  in  this . _server )  { 
186+       this . _server . setEventBus ( EventBus ) ; 
187+     } 
188+ 
184189		this . setAliases ( this . _aliases ) ; 
185190
186191		if  ( this . _globsNeedWatching )  { 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments