diff --git a/.bazelrc b/.bazelrc index 018ff006a6..e72a141453 100644 --- a/.bazelrc +++ b/.bazelrc @@ -64,8 +64,13 @@ test --test_output=errors ################################ # Temporary Settings for Ivy # ################################ -# to determine if the compiler used should be Ivy or ViewEngine one can use `--define=compile=aot` on -# any bazel target. This is a temporary flag until codebase is permanently switched to Ivy. +# To determine if the compiler used should be Ivy instead of ViewEngine, one can use `--config=ivy` +# on any bazel target. This is a temporary flag until codebase is permanently switched to Ivy. +build --define=angular_ivy_enabled=False + +build:view-engine --define=angular_ivy_enabled=False +build:ivy --define=angular_ivy_enabled=True --define=compile=aot + build --define=compile=legacy ################################## diff --git a/integration/bazel/.bazelrc b/integration/bazel/.bazelrc index 8a3e9ee831..6a605f64fb 100644 --- a/integration/bazel/.bazelrc +++ b/integration/bazel/.bazelrc @@ -13,6 +13,7 @@ build --local_resources=14336,8.0,1.0 # Use the Angular Ivy compiler # See https://github.com/angular/angular/blob/master/docs/BAZEL.md#various-flags-used-for-tests +build --define=angular_ivy_enabled=True build --define=compile=aot # Temporary define while angular depends on the legacy rollup_bundle rule. diff --git a/packages/bazel/src/builders/files/__dot__bazelrc.template b/packages/bazel/src/builders/files/__dot__bazelrc.template index 6cbfc89ca5..69c05f64fe 100644 --- a/packages/bazel/src/builders/files/__dot__bazelrc.template +++ b/packages/bazel/src/builders/files/__dot__bazelrc.template @@ -30,6 +30,7 @@ test --test_output=errors # Use the Angular Ivy compiler # See https://github.com/angular/angular/blob/master/docs/BAZEL.md#various-flags-used-for-tests build --define=compile=aot +build --define=angular_ivy_enabled=True # Temporary define while angular depends on the legacy rollup_bundle rule. # TODO: remove this setting after https://github.com/angular/angular/pull/33201 lands.