These are loaded from the external repository created by npm_translate_lock
based on the name provided.
For example, if you run npm_translate_lock(name = "npm")
then these rules can be loaded with
load("@npm//:defs.bzl", "npm_link_targets", "npm_link_all_packages")
npm_link_all_packages(name, imported_links)
Generated list of npm_link_package() target generators and first-party linked packages corresponding to the packages in {pnpm_lock_label}
If you use manually-written npm_import
you can link these as well, for example,
load("@npm//:defs.bzl", "npm_link_all_packages")
load("@npm_meaning-of-life__links//:defs.bzl", npm_link_meaning_of_life = "npm_link_imported_package")
npm_link_all_packages(
name = "node_modules",
imported_links = [
npm_link_meaning_of_life,
],
)
PARAMETERS
npm_link_targets(name, package)
Generated list of target names that are linked by npm_link_all_packages()
PARAMETERS
RETURNS
A list of target names that are linked by npm_link_all_packages()