Skip to content

Commit 70e6ba9

Browse files
authored
chore: remove docs and decprecate exclude_types_from_npm_packages (#734)
1 parent 2a7a39f commit 70e6ba9

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

docs/transpiler.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -128,27 +128,3 @@ When `no_emit`, `transpiler` or `declaration_transpiler` is set, then the `ts_pr
128128
129129
[`build_test`]: https://github.com/bazelbuild/bazel-skylib/blob/main/rules/build_test.bzl
130130
[`--build_tests_only`]: https://docs.bazel.build/versions/main/user-manual.html#flag--build_tests_only
131-
132-
## Avoid eager type-checks via `npm_package`
133-
134-
A common pattern to link monorepo packages is to use the [`npm_package`](https://docs.aspect.build/rules/aspect_rules_js/docs/npm_package) rule.
135-
136-
When typings files (`*.d.ts`) are included in the `npm_package`, this can cause the type-checker to run, even for a development round-trip that shouldn't need it.
137-
138-
For example,
139-
140-
```
141-
ts_project(name = a) --foo.d.ts--> npm_package ---> npm_link_package ---> ts_project(name = b) ---> js_test
142-
```
143-
144-
In this diagram, we'd like to be able to change the TypeScript sources of `a` and then re-run the test target, without waiting for type-checking.
145-
However, since `foo.d.ts` is declared as an input to the `npm_package` rule, Bazel needs to produce it.
146-
147-
To solve this, you can add the flag `--@aspect_rules_js//npm:exclude_types_from_npm_packages` to your `bazel` command.
148-
149-
Use this flag only for local development! You can add a line to your `.bazelrc` to make this easier to type, for example:
150-
151-
```
152-
# Run bazel --config=dev to choose these options:
153-
build:dev --@aspect_rules_js//npm:exclude_types_from_npm_packages
154-
```

0 commit comments

Comments
 (0)