Skip to content

Commit

Permalink
fix(typescript): Exclude .json from _out_paths
Browse files Browse the repository at this point in the history
When TS compiles a project with JSON files, it doesn't generate `.js` or `.map` or `.d.ts`. The file is kept as is.
  • Loading branch information
longlho authored and alexeagle committed Jun 30, 2020
1 parent bafcda0 commit 91d81b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/typescript/internal/ts_project.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ validate_options = rule(
)

def _out_paths(srcs, outdir, ext):
return [_join(outdir, f[:f.rindex(".")] + ext) for f in srcs if not f.endswith(".d.ts")]
return [_join(outdir, f[:f.rindex(".")] + ext) for f in srcs if not f.endswith(".d.ts") and not f.endswith(".json")]

def ts_project_macro(
name = "tsconfig",
Expand Down

0 comments on commit 91d81b3

Please sign in to comment.