Skip to content

Commit 351d6e7

Browse files
authored
Revert "fix: don't recommend bazelrc common verb" (#528)
* Revert "fix: don't recommend bazelrc common verb" * Update transpiler.md * Update BUILD.bazel * Update transpiler.md
1 parent edd43a7 commit 351d6e7

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

docs/transpiler.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,16 @@ You can simply disable this error for all targets in the build, behaving the sam
7878
Just add this to `/.bazelrc``:
7979
8080
# Use "tsc" as the transpiler when ts_project has no `transpiler` set.
81+
# Bazel 6.4 or greater: 'common' means 'any command that supports this flag'
82+
common --@aspect_rules_ts//ts:default_to_tsc_transpiler
83+
84+
# Between Bazel 6.0 and 6.3, you need all of this, to avoid discarding the analysis cache:
8185
build --@aspect_rules_ts//ts:default_to_tsc_transpiler
8286
fetch --@aspect_rules_ts//ts:default_to_tsc_transpiler
8387
query --@aspect_rules_ts//ts:default_to_tsc_transpiler
8488
89+
# Before Bazel 6.0, only the 'build' and 'fetch' lines work.
90+
8591
### Other Transpilers
8692
8793
The `transpiler` attribute accepts any rule or macro with this signature: `(name, srcs, **kwargs)`

ts/BUILD.bazel

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,28 @@ You must choose exactly one of the following flags:
2828
1. To choose the faster performance put this in /.bazelrc:
2929
3030
# passes an argument `--skipLibCheck` to *every* spawn of tsc
31+
# Bazel 6.4 or greater: 'common' means 'any command that supports this flag'
32+
common --@aspect_rules_ts//ts:skipLibCheck=always
33+
34+
# Between Bazel 6.0 and 6.3, you need all of this, to avoid discarding the analysis cache:
3135
build --@aspect_rules_ts//ts:skipLibCheck=always
3236
fetch --@aspect_rules_ts//ts:skipLibCheck=always
3337
query --@aspect_rules_ts//ts:skipLibCheck=always
3438
39+
# Before Bazel 6.0, only the 'build' and 'fetch' lines work.
40+
3541
2. To choose more correct typechecks, put this in /.bazelrc:
3642
3743
# honor the setting of `skipLibCheck` in the tsconfig.json file
44+
# Bazel 6.4 or greater: 'common' means 'any command that supports this flag'
45+
common --@aspect_rules_ts//ts:skipLibCheck=honor_tsconfig
46+
47+
# Between Bazel 6.0 and 6.3, you need all of this, to avoid discarding the analysis cache:
3848
build --@aspect_rules_ts//ts:skipLibCheck=honor_tsconfig
3949
fetch --@aspect_rules_ts//ts:skipLibCheck=honor_tsconfig
4050
query --@aspect_rules_ts//ts:skipLibCheck=honor_tsconfig
4151
52+
# Before Bazel 6.0, only the 'build' and 'fetch' lines work.
4253
4354
##########################################################
4455
"""

0 commit comments

Comments
 (0)