File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 1- load ("@npm//:defs.bzl" , "link_js_packages" )
1+ load ("@npm//:defs.bzl" , "link_js_packages" , "package" )
22load ("@aspect_rules_js//js:defs.bzl" , "link_js_package" )
33
44# Building this target results in bazel-bin/examples/node_modules/@myorg/js_lib, so that
55# TypeScript and other node programs beneath bazel-bin/examples are able to resolve its location.
66link_js_package (
7- name = "link_js_lib" ,
7+ name = package ( "@myorg/js_lib" ). name ,
88 src = "//examples/js_lib" ,
99 visibility = ["//examples:__subpackages__" ],
1010)
Original file line number Diff line number Diff line change 11load ("@aspect_rules_ts//ts:defs.bzl" , "ts_project" )
22load ("@bazel_skylib//rules:write_file.bzl" , "write_file" )
3+ load ("@npm//:defs.bzl" , "package" )
34
45# Dependencies for all targets in this package
56_DEPS = [
6- "//examples:link_js_lib" ,
7+ # For packages within the workspace, we use the package() helper to get a label
8+ # for the location where it's linked in the node_modules tree:
9+ package ("@myorg/js_lib" ),
10+ # Third-party packages from npm can be referenced directly:
711 "@npm//@types/node" ,
812]
913
You can’t perform that action at this time.
0 commit comments