Skip to content

Commit

Permalink
fix(builtin): --nobazel_run_linker implies --bazel_patch_module_resolver
Browse files Browse the repository at this point in the history
If you turn off the linker, you're reverting to earlier rules_nodejs behavior where third-party node modules can
only be resolved using the patched require() function that knows where to find them
  • Loading branch information
Alex Eagle authored and gregmagolan committed Dec 11, 2020
1 parent 0203c06 commit 7100277
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/node/launcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ for ARG in ${ALL_ARGS[@]+"${ALL_ARGS[@]}"}; do
# Disable the --require node-patches (undocumented and unused; only here as an escape value)
--nobazel_node_patches) NODE_PATCHES=false ;;
# Disable the linker pre-process (undocumented and unused; only here as an escape value)
--nobazel_run_linker) RUN_LINKER=false ;;
# It also enables the --bazel_patch_module_resolver flag, as either the linker or require() patch
# is needed for resolving third-party node modules.
--nobazel_run_linker) RUN_LINKER=false PATCH_REQUIRE=true ;;
# Let users pass through arguments to node itself
--node_options=*) USER_NODE_OPTIONS+=( "${ARG#--node_options=}" ) ;;
# Remaining argv is collected to pass to the program
Expand Down

0 comments on commit 7100277

Please sign in to comment.