rules_ts
rules_ts copied to clipboard
[Bug]: `isolated_typecheck` & project references
What happened?
I'm having a hard time getting the new isolated_typecheck
to play nicely with TypeScript's project references.
A naive setup (repro here) without explicit ts_config()
targets fails during .d.ts
transpilation because it can't find the tsconfig.json
files of dependency projects:
Adding explicit ts_config()
targets with deps
on in-repo dependencies (repro on this branch here) seems to fix the issue, but I can't get bazel configure
to auto-generate the dependencies without failing like this:
I guess that's probably a separate issue for https://github.com/aspect-build/aspect-cli.
It's unintuitive that setting isolated_typecheck = True
triggers the need for explicit ts_config()
targets, almost as an accident (I think) of using tsc
to do the .d.ts
transpilation.
Version
Development (host) and target OS/architectures:
Output of bazel --version
: aspect 2024.51.11+60ad64d6e
Version of the Aspect rules, or other relevant rules from your
WORKSPACE
or MODULE.bazel
file:
bazel_dep(name = "aspect_bazel_lib", version = "2.10.0")
bazel_dep(name = "rules_multitool", version = "1.0.0")
bazel_dep(name = "aspect_rules_js", version = "2.1.2")
bazel_dep(name = "aspect_rules_ts", version = "3.3.2")
bazel_dep(name = "aspect_rules_swc", version = "2.2.0")
Language(s) and/or frameworks involved: TypeScript
How to reproduce
See: https://github.com/walkerburgin/isolated-typecheck-project-references-repro
Any other information?
No response