File tree 2 files changed +6
-2
lines changed
packages/ngtools/webpack/src
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -355,8 +355,6 @@ export class AngularCompilerPlugin {
355
355
this . _updateForkedTypeChecker ( this . _rootNames , this . _getChangedCompilationFiles ( ) ) ;
356
356
}
357
357
358
- // Use an identity function as all our paths are absolute already.
359
- this . _moduleResolutionCache = ts . createModuleResolutionCache ( this . _basePath , x => x ) ;
360
358
const oldTsProgram = this . _getTsProgram ( ) ;
361
359
362
360
if ( this . _JitMode ) {
@@ -721,6 +719,9 @@ export class AngularCompilerPlugin {
721
719
) ;
722
720
}
723
721
722
+ // Use an identity function as all our paths are absolute already.
723
+ this . _moduleResolutionCache = ts . createModuleResolutionCache ( this . _basePath , x => x ) ;
724
+
724
725
// Create the webpack compiler host.
725
726
const webpackCompilerHost = new WebpackCompilerHost (
726
727
this . _compilerOptions ,
@@ -729,6 +730,7 @@ export class AngularCompilerPlugin {
729
730
true ,
730
731
this . _options . directTemplateLoading ,
731
732
ngccProcessor ,
733
+ this . _moduleResolutionCache ,
732
734
) ;
733
735
734
736
// Create and set a new WebpackResourceLoader in AOT
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ export class WebpackCompilerHost implements ts.CompilerHost {
46
46
private readonly cacheSourceFiles : boolean ,
47
47
private readonly directTemplateLoading = false ,
48
48
private readonly ngccProcessor ?: NgccProcessor ,
49
+ private readonly moduleResolutionCache ?: ts . ModuleResolutionCache ,
49
50
) {
50
51
this . _syncHost = new virtualFs . SyncDelegateHost ( host ) ;
51
52
this . _memoryHost = new virtualFs . SyncDelegateHost ( new virtualFs . SimpleMemoryHost ( ) ) ;
@@ -405,6 +406,7 @@ export class WebpackCompilerHost implements ts.CompilerHost {
405
406
workaroundResolve ( containingFile ) ,
406
407
this . _options ,
407
408
this ,
409
+ this . moduleResolutionCache ,
408
410
) ;
409
411
410
412
if ( this . _options . enableIvy && resolvedModule && this . ngccProcessor ) {
You can’t perform that action at this time.
0 commit comments