From 22d58fc89b54d158adc2e433e71edb8bae4fe809 Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Tue, 21 Aug 2018 13:47:27 -0700 Subject: [PATCH] build(bazel): remove workaround no longer needed for module names for ngfactory & ngsummary files (#25604) Workaround was added in https://github.com/angular/angular/pull/25335. It was necessary for .ngfactory & .ngsummary files to have proper AMD module names starting with @angular when building angular downstream from source using Bazel. The underlying issue has been resolved in the compiler and these files now get proper AMD module names without the need for this workaround. The workaround had an unexpected consequence https://github.com/angular/angular-cli/issues/11835 which is fixed by its removal. PR Close #25604 --- packages/compiler/src/aot/summary_resolver.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/packages/compiler/src/aot/summary_resolver.ts b/packages/compiler/src/aot/summary_resolver.ts index 28bf5fac66..0f2c1f855e 100644 --- a/packages/compiler/src/aot/summary_resolver.ts +++ b/packages/compiler/src/aot/summary_resolver.ts @@ -120,16 +120,6 @@ export class AotSummaryResolver implements SummaryResolver { summaries.forEach((summary) => this.summaryCache.set(summary.symbol, summary)); if (moduleName) { this.knownFileNameToModuleNames.set(filePath, moduleName); - if (filePath.endsWith('.d.ts')) { - // Also add entries to map the ngfactory & ngsummary files to their module names. - // This is necessary to resolve ngfactory & ngsummary files to their AMD module - // names when building angular with Bazel from source downstream. - // See https://github.com/bazelbuild/rules_typescript/pull/223 for context. - this.knownFileNameToModuleNames.set( - filePath.replace(/\.d\.ts$/, '.ngfactory.d.ts'), moduleName + '.ngfactory'); - this.knownFileNameToModuleNames.set( - filePath.replace(/\.d\.ts$/, '.ngsummary.d.ts'), moduleName + '.ngsummary'); - } } importAs.forEach((importAs) => { this.importAs.set(importAs.symbol, importAs.importAs); }); }