Sean Condon | 6a6f9a0 | 2020-01-09 14:09:36 +0000 | [diff] [blame] | 1 | # Make TypeScript and Angular compilation fast, by keeping a few copies of the |
| 2 | # compiler running as daemons, and cache SourceFile AST's to reduce parse time. |
| 3 | build --strategy=TypeScriptCompile=worker |
| 4 | build --strategy=AngularTemplateCompile=worker |
| 5 | |
| 6 | # Don't create bazel-* symlinks in the WORKSPACE directory, except `bazel-out`, |
| 7 | # which is mandatory. |
| 8 | # These require .gitignore and may scare users. |
| 9 | # Also, it's a workaround for https://github.com/bazelbuild/rules_typescript/issues/12 |
| 10 | # which affects the common case of having `tsconfig.json` in the WORKSPACE directory. |
| 11 | # |
| 12 | # Instead, the output will appear in `dist/bin`. You'll need to ignore the |
| 13 | # `bazel-out` directory that is created in the workspace root. |
| 14 | build --symlink_prefix=dist/ |
| 15 | |
| 16 | # Turn on --incompatible_strict_action_env which was on by default |
| 17 | # in Bazel 0.21.0 but turned off again in 0.22.0. Follow |
| 18 | # https://github.com/bazelbuild/bazel/issues/7026 for more details. |
| 19 | # This flag is needed to so that the bazel cache is not invalidated |
| 20 | # when running bazel via `yarn bazel`. |
| 21 | # See https://github.com/angular/angular/issues/27514. |
| 22 | build --incompatible_strict_action_env |
| 23 | run --incompatible_strict_action_env |
| 24 | test --incompatible_strict_action_env |
| 25 | |
| 26 | build --incompatible_bzl_disallow_load_after_statement=false |
| 27 | |
| 28 | test --test_output=errors |
| 29 | |
| 30 | # Use the Angular Ivy compiler |
| 31 | # See https://github.com/angular/angular/blob/master/docs/BAZEL.md#various-flags-used-for-tests |
| 32 | build --define=angular_ivy_enabled=True |
| 33 | |
| 34 | # Temporary define while angular depends on the legacy rollup_bundle rule. |
| 35 | # TODO: remove this setting after https://github.com/angular/angular/pull/33201 lands. |
| 36 | build --define=enable_legacy_rollup_rule=1 |
| 37 | |
| 38 | # Turn on managed directories feature in Bazel |
| 39 | # This allows us to avoid installing a second copy of node_modules |
| 40 | common --experimental_allow_incremental_repository_updates |