rules_js
rules_js copied to clipboard
[FR]: Provide a way to overwrite existing npm dependency with a Bazel build target
What is the current behavior?
No response
Describe the feature
We have a number of npm dependencies that rely on the lifecycle scripts to build themselves using gyp. Instead of using gyp, we would like to build these packages using our own hermetic cc toolchain in Bazel. It would be great if there is a way to substitute a package in npm_translate_lock with a Bazel target.
Example hypothetical API to substitude node-re2 npm dependency with @node-re2 target:
npm_translate_lock(
inject_packages = {
"node-re2@*": "@node-re2//:node-re2"
}
)