Skip to content

Commit 180dfe6

Browse files
committed
build: use a more restrictive node modules glob
1 parent a3994ea commit 180dfe6

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

BUILD

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,23 @@ exports_files([
1515
# @external_begin
1616
filegroup(
1717
name = "node_modules",
18-
srcs = glob(["node_modules/**/*"]),
18+
srcs = glob(
19+
# Only include files we might use, to reduce the file count and surface size of
20+
# filename problems.
21+
[
22+
"node_modules/**/*.js",
23+
"node_modules/**/*.json",
24+
"node_modules/**/*.d.ts",
25+
],
26+
exclude = [
27+
# e.g. node_modules/adm-zip/test/assets/attributes_test/New folder/hidden.txt
28+
"node_modules/**/test/**",
29+
# e.g. node_modules/xpath/docs/function resolvers.md
30+
"node_modules/**/docs/**",
31+
# e.g. node_modules/puppeteer/.local-chromium/mac-536395/chrome-mac/Chromium.app/Contents/Versions/66.0.3347.0/Chromium Framework.framework/Chromium Framework
32+
"node_modules/**/.*/**"
33+
],
34+
) + glob(["node_modules/.bin/*"]),
1935
)
2036
# @external_end
2137

0 commit comments

Comments
 (0)