rules_nodejs
v6.4.0
published 11 hours ago
745 stars
519 forks
33 watchers
Apache License 2.0
public
4 assets
33,014,489 downloads
248 KB
Compatibility level 1
i/0RTpXojfXsxmsDtyaUT0eotG20s7as6Hz8MWcTvRw=
Maintained byAlex Eagle
v6.4.0
May 15, 2025

[!WARNING]

Node 20 by default

This release updates the default Node.js version from v18 to v20. If this is breaking for you, explicitly set a v18 release.

Using Bzlmod with Bazel 6 or greater

  1. (Bazel 6 only) Enable with common --enable_bzlmod in .bazelrc.
  2. Add to your MODULE.bazel file:
bazel_dep(name = "rules_nodejs", version = "6.4.0")

Using WORKSPACE

Paste this snippet into your WORKSPACE.bazel file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_nodejs",
    sha256 = "8bfd114e95e88df5ecc66b03b726944f47a8b46db4b3b6ace87cfc316713bd1c",
    strip_prefix = "rules_nodejs-6.4.0",
    url = "https://github.com/bazel-contrib/rules_nodejs/releases/download/v6.4.0/rules_nodejs-v6.4.0.tar.gz",
)

What's Changed

Full Changelog: https://github.com/bazel-contrib/rules_nodejs/compare/v6.3.5...v6.4.0

Deps:
Assets:

JavaScript rules for Bazel

Build status GitHub release (latest by date)

This ruleset provides a Node.js development toolchain and runtime with Bazel. It does not have any rules for using Node.js, such as nodejs_binary. For that, we recommend rules_js.

This repository is maintained by volunteers in the Bazel community. Neither Google, nor the Bazel team, provides support for the code. However, this repository is part of the test suite used to vet new Bazel releases.

We follow semantic versioning. Patch releases have bugfixes, minor releases have new features. Only major releases (1.x, 2.x) have breaking changes. We support LTS releases of Bazel (starting at 4.x), see SUPPORTED_BAZEL_VERSIONS in our /index.bzl for the list we test against.

6.0 Scope Reduction

This branch is the latest release, 6.x.x It has a greatly reduced scope from previous releases, as most of the code was unmaintained. See the 5.x branch for the prior state of the repo.

Documentation

Comprehensive documentation for installing and using the rules, including generated API docs: https://bazel-contrib.github.io/rules_nodejs/