Skip to content

Commit

Permalink
fix(typescript): fixed build for external ts_project targets
Browse files Browse the repository at this point in the history
  • Loading branch information
a-ignatov-parc authored and alexeagle committed Feb 12, 2021
1 parent 8386b97 commit c89e0aa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/typescript/internal/ts_project.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ def _calculate_root_dir(ctx):

return _join(
root_path,
ctx.label.workspace_root,
ctx.label.package,
ctx.attr.root_dir,
)
Expand All @@ -115,15 +116,15 @@ def _ts_project_impl(ctx):
"--project",
ctx.file.tsconfig.path,
"--outDir",
_join(ctx.bin_dir.path, ctx.label.package, ctx.attr.out_dir),
_join(ctx.bin_dir.path, ctx.label.workspace_root, ctx.label.package, ctx.attr.out_dir),
"--rootDir",
_calculate_root_dir(ctx),
])
if len(ctx.outputs.typings_outs) > 0:
declaration_dir = ctx.attr.declaration_dir if ctx.attr.declaration_dir else ctx.attr.out_dir
arguments.add_all([
"--declarationDir",
_join(ctx.bin_dir.path, ctx.label.package, declaration_dir),
_join(ctx.bin_dir.path, ctx.label.workspace_root, ctx.label.package, declaration_dir),
])

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

0 comments on commit c89e0aa

Please sign in to comment.