Skip to content

Commit c89e0aa

Browse files
a-ignatov-parcalexeagle
authored andcommitted
fix(typescript): fixed build for external ts_project targets
1 parent 8386b97 commit c89e0aa

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

packages/typescript/internal/ts_project.bzl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ def _calculate_root_dir(ctx):
9191

9292
return _join(
9393
root_path,
94+
ctx.label.workspace_root,
9495
ctx.label.package,
9596
ctx.attr.root_dir,
9697
)
@@ -115,15 +116,15 @@ def _ts_project_impl(ctx):
115116
"--project",
116117
ctx.file.tsconfig.path,
117118
"--outDir",
118-
_join(ctx.bin_dir.path, ctx.label.package, ctx.attr.out_dir),
119+
_join(ctx.bin_dir.path, ctx.label.workspace_root, ctx.label.package, ctx.attr.out_dir),
119120
"--rootDir",
120121
_calculate_root_dir(ctx),
121122
])
122123
if len(ctx.outputs.typings_outs) > 0:
123124
declaration_dir = ctx.attr.declaration_dir if ctx.attr.declaration_dir else ctx.attr.out_dir
124125
arguments.add_all([
125126
"--declarationDir",
126-
_join(ctx.bin_dir.path, ctx.label.package, declaration_dir),
127+
_join(ctx.bin_dir.path, ctx.label.workspace_root, ctx.label.package, declaration_dir),
127128
])
128129

129130
# When users report problems, we can ask them to re-build with

0 commit comments

Comments
 (0)