Specify exact dependencies for rollup-bin
rollup-bin specified whole @tools_npm//:node_modules. As a result, any
rule which uses rollup-bin requires the whole content of the
node_modules folder. This leads to the issue with the remote build
executor which has a limit on the number of files in an input tree.
Issue: 12511
Change-Id: Iff5330417f78bdba4b5c1de4b67c3a10f15b7272
diff --git a/tools/node_tools/BUILD b/tools/node_tools/BUILD
index 018674c..4019542 100644
--- a/tools/node_tools/BUILD
+++ b/tools/node_tools/BUILD
@@ -8,8 +8,12 @@
# Usage: rollup_bundle(rollup_bin = "//tools/node_tools:rollup-bin, ...)
nodejs_binary(
name = "rollup-bin",
+ # Define only minimal required dependencies.
+ # Otherwise remote build execution fails with the too many
+ # files error when it builds :release target.
data = [
- "@tools_npm//:node_modules",
+ "@tools_npm//rollup",
+ "@tools_npm//rollup-plugin-terser",
],
# The entry point must be "@tools_npm:node_modules/rollup/dist/bin/rollup",
# But bazel doesn't run it correctly with the following command line: