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 {
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 ) {
@@ -675,6 +673,9 @@ export class AngularCompilerPlugin {
675
673
) ;
676
674
}
677
675
676
+ // Use an identity function as all our paths are absolute already.
677
+ this . _moduleResolutionCache = ts . createModuleResolutionCache ( this . _basePath , x => x ) ;
678
+
678
679
// Create the webpack compiler host.
679
680
const webpackCompilerHost = new WebpackCompilerHost (
680
681
this . _compilerOptions ,
@@ -683,6 +684,7 @@ export class AngularCompilerPlugin {
683
684
true ,
684
685
this . _options . directTemplateLoading ,
685
686
ngccProcessor ,
687
+ this . _moduleResolutionCache ,
686
688
) ;
687
689
688
690
// 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