-
Notifications
You must be signed in to change notification settings - Fork 523
/
MODULE.bazel
51 lines (33 loc) · 2.16 KB
/
MODULE.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
"bzlmod declaration for bazel-contrib/rules_nodejs"
module(
name = "rules_nodejs",
version = "0.0.0",
compatibility_level = 1,
)
# Lower-bounds (minimum) versions for direct runtime dependencies
bazel_dep(name = "bazel_skylib", version = "1.4.1")
bazel_dep(name = "platforms", version = "0.0.5")
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
# Note, this gets the default version of Node.js from
# https://github.com/bazel-contrib/rules_nodejs/blob/main/nodejs/repositories.bzl#L11
node.toolchain()
use_repo(node, "nodejs_toolchains")
# Toolchain registration under bzlmod should match the order of WORKSPACE registration
# which is the order specified in the PLATFORMS dict https://github.com/bazel-contrib/rules_nodejs/blob/4c373209b058d46f2a5f9ab9f8abf11b161ae459/nodejs/private/nodejs_toolchains_repo.bzl#L20.
# For each platform, `:<PLATFORM>_toolchain_target` should be registered before `:<PLATFORM>_toolchain`,
# https://github.com/bazel-contrib/rules_nodejs/blob/4c373209b058d46f2a5f9ab9f8abf11b161ae459/nodejs/repositories.bzl#L461/.
# See https://github.com/bazelbuild/bazel/issues/19645 and https://github.com/bazel-contrib/rules_nodejs/pull/3750 for more context.
register_toolchains("@nodejs_toolchains//:linux_amd64_toolchain_target")
register_toolchains("@nodejs_toolchains//:linux_amd64_toolchain")
register_toolchains("@nodejs_toolchains//:linux_arm64_toolchain_target")
register_toolchains("@nodejs_toolchains//:linux_arm64_toolchain")
register_toolchains("@nodejs_toolchains//:linux_s390x_toolchain_target")
register_toolchains("@nodejs_toolchains//:linux_s390x_toolchain")
register_toolchains("@nodejs_toolchains//:linux_ppc64le_toolchain_target")
register_toolchains("@nodejs_toolchains//:linux_ppc64le_toolchain")
register_toolchains("@nodejs_toolchains//:darwin_amd64_toolchain_target")
register_toolchains("@nodejs_toolchains//:darwin_amd64_toolchain")
register_toolchains("@nodejs_toolchains//:darwin_arm64_toolchain_target")
register_toolchains("@nodejs_toolchains//:darwin_arm64_toolchain")
register_toolchains("@nodejs_toolchains//:windows_amd64_toolchain_target")
register_toolchains("@nodejs_toolchains//:windows_amd64_toolchain")