-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.bazelrc
77 lines (58 loc) · 3.3 KB
/
.bazelrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Import Aspect bazelrc presets
import %workspace%/.aspect/bazelrc/bazel6.bazelrc
import %workspace%/.aspect/bazelrc/convenience.bazelrc
import %workspace%/.aspect/bazelrc/correctness.bazelrc
import %workspace%/.aspect/bazelrc/debug.bazelrc
import %workspace%/.aspect/bazelrc/javascript.bazelrc
import %workspace%/.aspect/bazelrc/performance.bazelrc
### PROJECT SPECIFIC OPTIONS GO HERE ###
# Bazel 6.4 or greater: 'common' means 'any command that supports this flag'
# Use "tsc" as the transpiler when ts_project has no `transpiler` set.
common --@aspect_rules_ts//ts:default_to_tsc_transpiler
# Honor the setting of `skipLibCheck` in the tsconfig.json file
common --@aspect_rules_ts//ts:skipLibCheck=honor_tsconfig
build --disk_cache=~/.cache/bazel-disk-cache
build --strategy=TsProject=sandboxed
build --symlink_prefix=dist/
build --workspace_status_command=tools/bazel_workspace_status.sh
test --test_output=all
test --nocollect_code_coverage
test --build_tag_filters=ts
test --test_arg=--passWithNoTests
coverage --instrument_test_targets
coverage --collect_code_coverage
coverage --experimental_fetch_all_coverage_outputs
# Load any settings & overrides specific to the current user from `./bazelrc.user`.
# This file should appear in `.gitignore` so that settings are not shared with team members. This
# should be last statement in this config so the user configuration is able to overwrite flags from
# this file. See https://bazel.build/configure/best-practices#bazelrc-file.
try-import %workspace%/.bazelrc.user
######## Required Typecheck Performance Selection ########
# TypeScript's type-checking exposes a flag `--skipLibCheck`:
# https://www.typescriptlang.org/tsconfig#skipLibCheck
# Using this flag saves substantial time during type-checking.
# Rather than doing a full check of all d.ts files, TypeScript will only type-check the code you
# specifically refer to in your app's source code.
# We recommend this for most rules_ts users.
# HOWEVER this performance improvement comes at the expense of type-system accuracy.
# For example, two packages could define two copies of the same type in an inconsistent way.
# If you publish a library from your repository, your incorrect types may result in errors for your users.
# You must choose exactly one of the following flags:
# 1. To choose the faster performance put this in /.bazelrc:
# # passes an argument `--skipLibCheck` to *every* spawn of tsc
# build --@aspect_rules_ts//ts:skipLibCheck=always
# fetch --@aspect_rules_ts//ts:skipLibCheck=always
# query --@aspect_rules_ts//ts:skipLibCheck=always
# 2. To choose more correct typechecks, put this in /.bazelrc:
# # honor the setting of `skipLibCheck` in the tsconfig.json file
# build --@aspect_rules_ts//ts:skipLibCheck=honor_tsconfig
# fetch --@aspect_rules_ts//ts:skipLibCheck=honor_tsconfig
# query --@aspect_rules_ts//ts:skipLibCheck=honor_tsconfig
##########################################################
build --@aspect_rules_ts//ts:skipLibCheck=honor_tsconfig
fetch --@aspect_rules_ts//ts:skipLibCheck=honor_tsconfig
query --@aspect_rules_ts//ts:skipLibCheck=honor_tsconfig
# Use "tsc" as the transpiler when ts_project has no `transpiler` set.
build --@aspect_rules_ts//ts:default_to_tsc_transpiler
fetch --@aspect_rules_ts//ts:default_to_tsc_transpiler
query --@aspect_rules_ts//ts:default_to_tsc_transpiler