Skip to content

Commit 32be02f

Browse files
author
Jeremy Anantharaj
committed
add data runfiles to js_run_devserver sandbox
1 parent 157f755 commit 32be02f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

js/private/js_run_devserver.bzl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,13 @@ def _js_run_devserver_impl(ctx):
4949
include_npm_sources = ctx.attr.include_npm_sources,
5050
)]
5151

52+
default_data_runfiles = [target[DefaultInfo].default_runfiles.files for target in ctx.attr.data]
53+
5254
# The .to_list() calls here are intentional and cannot be avoided; they should be small sets of
5355
# files as they only include direct npm links (node_modules/foo) and the package store tree
5456
# artifacts those symlinks point to (node_modules/.aspect_rules_js/[email protected]/node_modules/foo)
5557
data_files = []
56-
for f in depset(transitive = transitive_runfiles + [dep.files for dep in ctx.attr.data]).to_list():
58+
for f in depset(transitive = transitive_runfiles + [dep.files for dep in ctx.attr.data] + default_data_runfiles).to_list():
5759
if "/.aspect_rules_js/" in f.path:
5860
# Special handling for package store deps; we only include 1st party deps since copying
5961
# all 3rd party node_modules over is expensive for typical graphs

0 commit comments

Comments
 (0)