blob: 5ab593b4e466c60ec32035d498815c0ac80a1a81 [file] [log] [blame]
Sean Condon6a6f9a02020-01-09 14:09:36 +00001# 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.
3build --strategy=TypeScriptCompile=worker
4build --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.
14build --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.
22build --incompatible_strict_action_env
23run --incompatible_strict_action_env
24test --incompatible_strict_action_env
25
26build --incompatible_bzl_disallow_load_after_statement=false
27
28test --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
32build --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.
36build --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
40common --experimental_allow_incremental_repository_updates