@@ -54,15 +54,16 @@ export class NgccProcessor {
54
54
resolvedModule : ts . ResolvedModule | ts . ResolvedTypeReferenceDirective ,
55
55
) : void {
56
56
const resolvedFileName = resolvedModule . resolvedFileName ;
57
- if ( ! resolvedFileName || moduleName . startsWith ( '.' ) || this . _processedModules . has ( moduleName ) ) {
57
+ if ( ! resolvedFileName || moduleName . startsWith ( '.' )
58
+ || this . _processedModules . has ( resolvedFileName ) ) {
58
59
// Skip when module is unknown, relative or NGCC compiler is not found or already processed.
59
60
return ;
60
61
}
61
62
62
63
const packageJsonPath = this . tryResolvePackage ( moduleName , resolvedFileName ) ;
63
64
if ( ! packageJsonPath ) {
64
65
// add it to processed so the second time round we skip this.
65
- this . _processedModules . add ( moduleName ) ;
66
+ this . _processedModules . add ( resolvedFileName ) ;
66
67
67
68
return ;
68
69
}
@@ -73,7 +74,7 @@ export class NgccProcessor {
73
74
accessSync ( packageJsonPath , constants . W_OK ) ;
74
75
} catch {
75
76
// add it to processed so the second time round we skip this.
76
- this . _processedModules . add ( moduleName ) ;
77
+ this . _processedModules . add ( resolvedFileName ) ;
77
78
78
79
return ;
79
80
}
@@ -97,7 +98,11 @@ export class NgccProcessor {
97
98
// tslint:disable-next-line:no-any
98
99
( this . inputFileSystem as any ) . purge ( packageJsonPath ) ;
99
100
100
- this . _processedModules . add ( moduleName ) ;
101
+ this . _processedModules . add ( resolvedFileName ) ;
102
+ }
103
+
104
+ invalidate ( fileName : string ) {
105
+ this . _processedModules . delete ( fileName ) ;
101
106
}
102
107
103
108
/**
0 commit comments