diff --git a/WORKSPACE b/WORKSPACE index 435f83bc62..826c846796 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -96,7 +96,10 @@ install_bazel_dependencies() git_repository( name = "build_bazel_rules_typescript", commit = "10a5a86885f95ab788fd841ade47b6a16e0c13d6", - patches = ["//:rules_typescript_pr_496.patch"], + patches = [ + "//:rules_typescript_pr_494.patch", + "//:rules_typescript_pr_496.patch", + ], remote = "http://github.com/bazelbuild/rules_typescript.git", shallow_since = "1582757372 -0800", ) diff --git a/rules_typescript_pr_494.patch b/rules_typescript_pr_494.patch new file mode 100644 index 0000000000..4f5d7617ea --- /dev/null +++ b/rules_typescript_pr_494.patch @@ -0,0 +1,13 @@ +diff --git internal/common/module_mappings.bzl internal/common/module_mappings.bzl +index b74e5b8..286c3b3 100644 +--- internal/common/module_mappings.bzl ++++ internal/common/module_mappings.bzl +@@ -76,7 +76,7 @@ def get_module_mappings(label, attrs, srcs = [], workspace_name = None, mappings + workspace_name or label.workspace_root, + label.package, + ] if p]) +- if attrs.module_root and attrs.module_root != ".": ++ if hasattr(attrs, "module_root") and attrs.module_root and attrs.module_root != ".": + mr = "%s/%s" % (mr, attrs.module_root) + if attrs.module_root.endswith(".ts"): + if workspace_name: