File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
packages/ngtools/webpack/src Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -355,8 +355,6 @@ export class AngularCompilerPlugin {
355355 this . _updateForkedTypeChecker ( this . _rootNames , this . _getChangedCompilationFiles ( ) ) ;
356356 }
357357
358- // Use an identity function as all our paths are absolute already.
359- this . _moduleResolutionCache = ts . createModuleResolutionCache ( this . _basePath , x => x ) ;
360358 const oldTsProgram = this . _getTsProgram ( ) ;
361359
362360 if ( this . _JitMode ) {
@@ -675,6 +673,9 @@ export class AngularCompilerPlugin {
675673 ) ;
676674 }
677675
676+ // Use an identity function as all our paths are absolute already.
677+ this . _moduleResolutionCache = ts . createModuleResolutionCache ( this . _basePath , x => x ) ;
678+
678679 // Create the webpack compiler host.
679680 const webpackCompilerHost = new WebpackCompilerHost (
680681 this . _compilerOptions ,
@@ -683,6 +684,7 @@ export class AngularCompilerPlugin {
683684 true ,
684685 this . _options . directTemplateLoading ,
685686 ngccProcessor ,
687+ this . _moduleResolutionCache ,
686688 ) ;
687689
688690 // 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 {
4646 private readonly cacheSourceFiles : boolean ,
4747 private readonly directTemplateLoading = false ,
4848 private readonly ngccProcessor ?: NgccProcessor ,
49+ private readonly moduleResolutionCache ?: ts . ModuleResolutionCache ,
4950 ) {
5051 this . _syncHost = new virtualFs . SyncDelegateHost ( host ) ;
5152 this . _memoryHost = new virtualFs . SyncDelegateHost ( new virtualFs . SimpleMemoryHost ( ) ) ;
@@ -405,6 +406,7 @@ export class WebpackCompilerHost implements ts.CompilerHost {
405406 workaroundResolve ( containingFile ) ,
406407 this . _options ,
407408 this ,
409+ this . moduleResolutionCache ,
408410 ) ;
409411
410412 if ( this . _options . enableIvy && resolvedModule && this . ngccProcessor ) {
You can’t perform that action at this time.
0 commit comments