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
This commit is contained in:
Greg Magolan 2018-08-21 13:47:27 -07:00 committed by Matias Niemelä
parent 27e2039630
commit 22d58fc89b
1 changed files with 0 additions and 10 deletions

View File

@ -120,16 +120,6 @@ export class AotSummaryResolver implements SummaryResolver<StaticSymbol> {
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); });
}