-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathts.bazelrc
More file actions
64 lines (60 loc) · 2.95 KB
/
ts.bazelrc
File metadata and controls
64 lines (60 loc) · 2.95 KB
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
########## 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
# # Bazel 6.4 or greater: 'common' means 'any command that supports this flag'
# common --@aspect_rules_ts//ts:skipLibCheck=always
#
# # Between Bazel 6.0 and 6.3, you need all of this, to avoid discarding the analysis cache:
# build --@aspect_rules_ts//ts:skipLibCheck=always
# fetch --@aspect_rules_ts//ts:skipLibCheck=always
# query --@aspect_rules_ts//ts:skipLibCheck=always
#
# # Before Bazel 6.0, only the 'build' and 'fetch' lines work.
#
# 2. To choose more correct typechecks, put this in /.bazelrc:
#
# # honor the setting of `skipLibCheck` in the tsconfig.json file
# # Bazel 6.4 or greater: 'common' means 'any command that supports this flag'
# common --@aspect_rules_ts//ts:skipLibCheck=honor_tsconfig
#
# # Between Bazel 6.0 and 6.3, you need all of this, to avoid discarding the analysis cache:
# build --@aspect_rules_ts//ts:skipLibCheck=honor_tsconfig
# fetch --@aspect_rules_ts//ts:skipLibCheck=honor_tsconfig
# query --@aspect_rules_ts//ts:skipLibCheck=honor_tsconfig
#
# # Before Bazel 6.0, only the 'build' and 'fetch' lines work.
#
# ##########################################################
#
#
# This instance of @@aspect_rules_ts~//ts:options has configuration identifier c704f78. To inspect its configuration, run: bazel config c704f78.
#
# For more help, see https://bazel.build/docs/configurable-attributes#faq-select-choose-condition.
# The option we've chosen: correct & fast enough.
#
# honor the setting of `skipLibCheck` in the tsconfig.json file
# Bazel 6.4 or greater: 'common' means 'any command that supports this flag'
common --@aspect_rules_ts//ts:skipLibCheck=honor_tsconfig
# Setting the transpiler to `tsc`.
# See: https://docs.aspect.build/rulesets/aspect_rules_ts/docs/transpiler/
common --@aspect_rules_ts//ts:default_to_tsc_transpiler
# Fix for CopyFile action from aspect_rules_js not supporting sandboxed execution
# This allows CopyFile to fall back to standalone while other actions use sandbox
# See: https://github.com/bazelbuild/bazel/issues/7480
build --strategy=CopyFile=standalone