@@ -430,7 +430,6 @@ export class DevServer {
430
430
* @param action - Whether the file was added or deleted
431
431
*/
432
432
#regenerateIndex( filePath : string , action : 'add' | 'delete' ) {
433
- console . log ( { filePath } )
434
433
if ( action === 'add' ) {
435
434
return this . #indexGenerator. addFile ( filePath )
436
435
}
@@ -702,20 +701,19 @@ export class DevServer {
702
701
703
702
this . #watcher. on ( 'add' , ( filePath ) => {
704
703
const relativePath = string . toUnixSlash ( filePath )
705
- const absolutePath = join ( this . #cwdPath, filePath )
706
- console . log ( { relativePath, absolutePath } )
704
+ const absolutePath = join ( this . #cwdPath, relativePath )
707
705
this . #hooks. runner ( 'fileAdded' ) . run ( relativePath , absolutePath , this )
708
706
} )
709
707
this . #watcher. on ( 'change' , ( filePath ) => {
710
708
const relativePath = string . toUnixSlash ( filePath )
711
- const absolutePath = join ( this . #cwdPath, filePath )
709
+ const absolutePath = join ( this . #cwdPath, relativePath )
712
710
this . #hooks
713
711
. runner ( 'fileChanged' )
714
712
. run ( relativePath , absolutePath , DevServer . #WATCHER_INFO, this )
715
713
} )
716
714
this . #watcher. on ( 'unlink' , ( filePath ) => {
717
715
const relativePath = string . toUnixSlash ( filePath )
718
- const absolutePath = join ( this . #cwdPath, filePath )
716
+ const absolutePath = join ( this . #cwdPath, relativePath )
719
717
this . #hooks. runner ( 'fileRemoved' ) . run ( relativePath , absolutePath , this )
720
718
} )
721
719
}
0 commit comments