diff --git a/internal/node/node.bzl b/internal/node/node.bzl index 921b757772..2ffe8355bb 100644 --- a/internal/node/node.bzl +++ b/internal/node/node.bzl @@ -100,6 +100,8 @@ def _write_loader_script(ctx): # point to the corresponding .js file if entry_point_path.endswith(".ts"): entry_point_path = entry_point_path[:-3] + ".js" + elif entry_point_path.endswith(".tsx"): + entry_point_path = entry_point_path[:-4] + ".jsx" ctx.actions.expand_template( template = ctx.file._loader_template, diff --git a/packages/typescript/src/internal/build_defs.bzl b/packages/typescript/src/internal/build_defs.bzl index 97731442eb..e917f199d3 100644 --- a/packages/typescript/src/internal/build_defs.bzl +++ b/packages/typescript/src/internal/build_defs.bzl @@ -90,7 +90,7 @@ def _filter_ts_inputs(all_inputs): return [ f for f in all_inputs - if f.path.endswith(".js") or f.path.endswith(".ts") or f.path.endswith(".json") + if f.extension in ["js", "jsx", "ts", "tsx", "json"] ] def _compile_action(ctx, inputs, outputs, tsconfig_file, node_opts, description = "prodmode"):