build(bazel): use bazel managed node_modules for downstream angular from source build support (#24663)

PR Close #24663
This commit is contained in:
Greg Magolan
2018-06-25 11:22:23 -07:00
committed by Igor Minar
parent 323faf954b
commit 1d051c5841
25 changed files with 1231 additions and 1125 deletions

View File

@ -207,6 +207,12 @@ export function compile({allowNonHermeticReads, allDepsCompiledWithBazel = true,
if (fileName ===
path.join(compilerOpts.baseUrl, bazelOpts.package, compilerOpts.flatModuleOutFile + '.ts'))
return true;
// Also handle the case when angular is build from source as an external repository
if (fileName ===
path.join(
compilerOpts.baseUrl, 'external/angular', bazelOpts.package,
compilerOpts.flatModuleOutFile + '.ts'))
return true;
return origBazelHostShouldNameModule(fileName) || NGC_GEN_FILES.test(fileName);
};