diff --git a/packages/compiler-cli/src/ngtsc/shims/src/host.ts b/packages/compiler-cli/src/ngtsc/shims/src/host.ts index 58a9d551b3..a945ec06b6 100644 --- a/packages/compiler-cli/src/ngtsc/shims/src/host.ts +++ b/packages/compiler-cli/src/ngtsc/shims/src/host.ts @@ -48,10 +48,9 @@ export class GeneratedShimsHostWrapper implements ts.CompilerHost { fileName: string, languageVersion: ts.ScriptTarget, onError?: ((message: string) => void)|undefined, shouldCreateNewSourceFile?: boolean|undefined): ts.SourceFile|undefined { - const canonical = this.getCanonicalFileName(fileName); for (let i = 0; i < this.shimGenerators.length; i++) { const generator = this.shimGenerators[i]; - const originalFile = generator.getOriginalSourceOfShim(canonical); + const originalFile = generator.getOriginalSourceOfShim(fileName); if (originalFile !== null) { // This shim generator has recognized the filename being requested, and is now responsible // for generating its contents, based on the contents of the original file it has requested.