Skip to content

Commit b45dfa7

Browse files
authored
fix(bazel): ensure spec-bundling supports npm dependencies (#2721)
We didn't bring in transitive npm sources. This commit fixes this, so that we can now e.g. import zone.js in bootstrap spec-bundling files.
1 parent 849c602 commit b45dfa7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

bazel/spec-bundling/spec-entrypoint.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def _spec_entrypoint_impl(ctx):
4545
for dep in ctx.attr.deps:
4646
if JsInfo in dep:
4747
spec_all_deps.append(dep[JsInfo].transitive_sources)
48+
spec_all_deps.append(dep[JsInfo].npm_sources)
4849
elif JSModuleInfo in dep:
4950
spec_all_deps.append(dep[JSModuleInfo].sources)
5051
else:
@@ -53,6 +54,7 @@ def _spec_entrypoint_impl(ctx):
5354
for dep in ctx.attr.bootstrap:
5455
if JsInfo in dep:
5556
bootstrap_all_deps.append(dep[JsInfo].transitive_sources)
57+
bootstrap_all_deps.append(dep[JsInfo].npm_sources)
5658
bootstrap_direct_deps.append(dep[JsInfo].sources)
5759
elif JSModuleInfo in dep:
5860
bootstrap_all_deps.append(dep[JSModuleInfo].sources)

0 commit comments

Comments
 (0)