@@ -97,7 +97,6 @@ export class WebpackCompilerHost implements ts.CompilerHost {
97
97
private _delegate : ts . CompilerHost ;
98
98
private _files : { [ path : string ] : VirtualFileStats | null } = Object . create ( null ) ;
99
99
private _directories : { [ path : string ] : VirtualDirStats | null } = Object . create ( null ) ;
100
- private _cachedResources : { [ path : string ] : string | undefined } = Object . create ( null ) ;
101
100
102
101
private _changedFiles : { [ path : string ] : boolean } = Object . create ( null ) ;
103
102
private _changedDirs : { [ path : string ] : boolean } = Object . create ( null ) ;
@@ -174,8 +173,8 @@ export class WebpackCompilerHost implements ts.CompilerHost {
174
173
fileName = this . resolve ( fileName ) ;
175
174
if ( fileName in this . _files ) {
176
175
this . _files [ fileName ] = null ;
177
- this . _changedFiles [ fileName ] = true ;
178
176
}
177
+ this . _changedFiles [ fileName ] = true ;
179
178
}
180
179
181
180
fileExists ( fileName : string , delegate = true ) : boolean {
@@ -299,22 +298,7 @@ export class WebpackCompilerHost implements ts.CompilerHost {
299
298
if ( this . _resourceLoader ) {
300
299
// These paths are meant to be used by the loader so we must denormalize them.
301
300
const denormalizedFileName = this . denormalizePath ( fileName ) ;
302
- const resourceDeps = this . _resourceLoader . getResourceDependencies ( denormalizedFileName ) ;
303
-
304
- if ( this . _cachedResources [ fileName ] === undefined
305
- || resourceDeps . some ( ( dep ) => this . _changedFiles [ this . resolve ( dep ) ] ) ) {
306
- return this . _resourceLoader . get ( denormalizedFileName )
307
- . then ( ( resource ) => {
308
- // Add resource dependencies to the compiler host file list.
309
- // This way we can check the changed files list to determine whether to use cache.
310
- this . _resourceLoader . getResourceDependencies ( denormalizedFileName )
311
- . forEach ( ( dep ) => this . readFile ( dep ) ) ;
312
- this . _cachedResources [ fileName ] = resource ;
313
- return resource ;
314
- } ) ;
315
- } else {
316
- return this . _cachedResources [ fileName ] ;
317
- }
301
+ return this . _resourceLoader . get ( denormalizedFileName ) ;
318
302
} else {
319
303
return this . readFile ( fileName ) ;
320
304
}
0 commit comments