mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
build: always ensure node_modules folders are not picked up in AIO (#48329)
AIO has two risk places where `node_modules` folders may exist and may be accidentally picked up by Bazel- even though they are already added as part of `.bazelignore` and made visible through `.gitignore`. It doesn't hurt instructing Bazel to always ignore `node_modules` as part of the `glob` instruction. Co-authored-by: Joey Perrott <josephperrott@gmail.com> PR Close #48329
This commit is contained in:
committed by
Andrew Kushnir
parent
eb43ed25eb
commit
0125677cfe
@@ -115,7 +115,10 @@ def docs_example(name, test = True, test_tags = [], test_exec_properties = {}, f
|
||||
|
||||
native.filegroup(
|
||||
name = "files",
|
||||
srcs = native.glob(["**"], exclude = ["BUILD.bazel"]),
|
||||
srcs = native.glob(["**"], exclude = [
|
||||
"BUILD.bazel",
|
||||
"**/node_modules/**", # Node modules may exist from the legacy setup.
|
||||
]),
|
||||
)
|
||||
|
||||
# Generate example boilerplate
|
||||
|
||||
@@ -4,6 +4,9 @@ filegroup(
|
||||
name = "shared",
|
||||
srcs = glob(
|
||||
["**"],
|
||||
exclude = ["BUILD.bazel"],
|
||||
exclude = [
|
||||
"BUILD.bazel",
|
||||
"**/node_modules/**", # Node modules may exist from the legacy setup.
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user