Skip to content

Commit 91d81b3

Browse files
longlhoalexeagle
authored andcommitted
fix(typescript): Exclude .json from _out_paths
When TS compiles a project with JSON files, it doesn't generate `.js` or `.map` or `.d.ts`. The file is kept as is.
1 parent bafcda0 commit 91d81b3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/typescript/internal/ts_project.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ validate_options = rule(
196196
)
197197

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

201201
def ts_project_macro(
202202
name = "tsconfig",

0 commit comments

Comments
 (0)