Skip to content

Commit

Permalink
docs(typescript): add host configuration to rootDirs (#2401)
Browse files Browse the repository at this point in the history
A `host` root directory is necessary for TypeScript to resolve imports for a tool executed at build time with `cfg = "host"`.

Arguably a similar change is also necessary for `cfg = "exec"`, however files would be in `bazel-out/k8-opt-exec-*/bin`, which can't be easily hard-coded in a tsconfig, so that's a problem to be tackled separately.
  • Loading branch information
dgp1130 authored Jan 18, 2021
1 parent a183c4b commit 1dda0af
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/typescript/internal/ts_project.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ def ts_project_macro(
> "compilerOptions": {
> "rootDirs": [
> ".",
> "../../bazel-out/host/bin/path/to",
> "../../bazel-out/darwin-fastbuild/bin/path/to",
> "../../bazel-out/k8-fastbuild/bin/path/to",
> "../../bazel-out/x64_windows-fastbuild/bin/path/to",
Expand Down

0 comments on commit 1dda0af

Please sign in to comment.