@@ -485,7 +485,7 @@ export class AngularWebpackPlugin {
485
485
! ignoreForEmit . has ( sourceFile ) &&
486
486
! angularCompiler . incrementalDriver . safeToSkipEmit ( sourceFile )
487
487
) {
488
- this . requiredFilesToEmit . add ( sourceFile . fileName ) ;
488
+ this . requiredFilesToEmit . add ( normalizePath ( sourceFile . fileName ) ) ;
489
489
}
490
490
}
491
491
@@ -500,7 +500,7 @@ export class AngularWebpackPlugin {
500
500
mergeTransformers ( angularCompiler . prepareEmit ( ) . transformers , transformers ) ,
501
501
getDependencies ,
502
502
( sourceFile ) => {
503
- this . requiredFilesToEmit . delete ( sourceFile . fileName ) ;
503
+ this . requiredFilesToEmit . delete ( normalizePath ( sourceFile . fileName ) ) ;
504
504
angularCompiler . incrementalDriver . recordSuccessfulEmit ( sourceFile ) ;
505
505
} ,
506
506
) ;
@@ -589,11 +589,12 @@ export class AngularWebpackPlugin {
589
589
onAfterEmit ?: ( sourceFile : ts . SourceFile ) => void ,
590
590
) : FileEmitter {
591
591
return async ( file : string ) => {
592
- if ( this . requiredFilesToEmitCache . has ( file ) ) {
593
- return this . requiredFilesToEmitCache . get ( file ) ;
592
+ const filePath = normalizePath ( file ) ;
593
+ if ( this . requiredFilesToEmitCache . has ( filePath ) ) {
594
+ return this . requiredFilesToEmitCache . get ( filePath ) ;
594
595
}
595
596
596
- const sourceFile = program . getSourceFile ( file ) ;
597
+ const sourceFile = program . getSourceFile ( filePath ) ;
597
598
if ( ! sourceFile ) {
598
599
return undefined ;
599
600
}
@@ -620,7 +621,7 @@ export class AngularWebpackPlugin {
620
621
if ( content !== undefined && this . watchMode ) {
621
622
// Capture emit history info for Angular rebuild analysis
622
623
hash = hashContent ( content ) ;
623
- this . fileEmitHistory . set ( file , { length : content . length , hash } ) ;
624
+ this . fileEmitHistory . set ( filePath , { length : content . length , hash } ) ;
624
625
}
625
626
626
627
const dependencies = [
0 commit comments