@@ -492,7 +492,7 @@ export class AngularWebpackPlugin {
492
492
! ignoreForEmit . has ( sourceFile ) &&
493
493
! angularCompiler . incrementalDriver . safeToSkipEmit ( sourceFile )
494
494
) {
495
- this . requiredFilesToEmit . add ( sourceFile . fileName ) ;
495
+ this . requiredFilesToEmit . add ( normalizePath ( sourceFile . fileName ) ) ;
496
496
}
497
497
}
498
498
@@ -507,7 +507,7 @@ export class AngularWebpackPlugin {
507
507
mergeTransformers ( angularCompiler . prepareEmit ( ) . transformers , transformers ) ,
508
508
getDependencies ,
509
509
( sourceFile ) => {
510
- this . requiredFilesToEmit . delete ( sourceFile . fileName ) ;
510
+ this . requiredFilesToEmit . delete ( normalizePath ( sourceFile . fileName ) ) ;
511
511
angularCompiler . incrementalDriver . recordSuccessfulEmit ( sourceFile ) ;
512
512
} ,
513
513
) ;
@@ -596,11 +596,12 @@ export class AngularWebpackPlugin {
596
596
onAfterEmit ?: ( sourceFile : ts . SourceFile ) => void ,
597
597
) : FileEmitter {
598
598
return async ( file : string ) => {
599
- if ( this . requiredFilesToEmitCache . has ( file ) ) {
600
- return this . requiredFilesToEmitCache . get ( file ) ;
599
+ const filePath = normalizePath ( file ) ;
600
+ if ( this . requiredFilesToEmitCache . has ( filePath ) ) {
601
+ return this . requiredFilesToEmitCache . get ( filePath ) ;
601
602
}
602
603
603
- const sourceFile = program . getSourceFile ( file ) ;
604
+ const sourceFile = program . getSourceFile ( filePath ) ;
604
605
if ( ! sourceFile ) {
605
606
return undefined ;
606
607
}
@@ -627,7 +628,7 @@ export class AngularWebpackPlugin {
627
628
if ( content !== undefined && this . watchMode ) {
628
629
// Capture emit history info for Angular rebuild analysis
629
630
hash = hashContent ( content ) ;
630
- this . fileEmitHistory . set ( file , { length : content . length , hash } ) ;
631
+ this . fileEmitHistory . set ( filePath , { length : content . length , hash } ) ;
631
632
}
632
633
633
634
const dependencies = [
0 commit comments