feat(ivy): open up ivy_switch_mode to non-core packages (#28711)

Prior to this fix, using the compiler's ivy_switch mechanism was
only available to core packages. This patch allows for this variable
switching mechanism to work across all other angular packages.

PR Close #28711
This commit is contained in:
Matias Niemelä
2019-02-01 15:33:41 -08:00
committed by Igor Minar
parent 09d894c283
commit d0e81eb593
2 changed files with 32 additions and 3 deletions

View File

@ -280,9 +280,7 @@ export class NgtscProgram implements api.Program {
beforeTransforms.push(
generatedFactoryTransform(this.factoryToSourceInfo, this.importRewriter));
}
if (this.isCore) {
beforeTransforms.push(ivySwitchTransform);
}
beforeTransforms.push(ivySwitchTransform);
if (customTransforms && customTransforms.beforeTs) {
beforeTransforms.push(...customTransforms.beforeTs);
}