Skip to content

Commit

Permalink
prepare for breaking change in rules_nodejs
Browse files Browse the repository at this point in the history
bazel-contrib/rules_nodejs#2125 is going to turn off the patching of the require() function by default. The reason is that it breaks compatibility with many node programs. However rules_sass depends on this, and also has at least conceptual sharing with google3 which uses the patched require() as well.

This change is a no-op for rules_nodejs 2.x where the default is true, but is required with rules_nodejs 3.0 where it will be false.
  • Loading branch information
Alex Eagle committed Dec 2, 2020
1 parent f89c128 commit a8871d8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sass/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@ nodejs_binary(
"@build_bazel_rules_sass_deps//sass",
"@build_bazel_rules_sass_deps//@bazel/worker",
],
# Opt-in to the patched require() function like google3 has
# rules_nodejs 3.0 will flip the default for this flag which breaks rules_sass users
templated_args = ["--bazel_patch_module_resolver"],
)

0 comments on commit a8871d8

Please sign in to comment.