rules_nodejs
rules_nodejs copied to clipboard
Support bzlmod users
When Bazel 5.0 ships, users are going to want to use rules_nodejs from their MODULE.bazel file. We should get our module registered in the bazel-central-registry and have it manage the toolchains.
Closed by https://github.com/bazelbuild/rules_nodejs/pull/3146?
Though, some follow up work would be documentation.
Is it possible to use npm_install
with bzlmod?
no, there are two Bazel modules in this repo: rules_nodejs
which is on bazel-central-registry and build_bazel_rules_nodejs
which isn't. I don't plan to spend any time on the latter, since all the maintainers here have moved to aspect_rules_js
(which is on the bazel-central-registry)
I think the only practical path forward is to migrate to rules_js before bzlmod, unless someone else from the community wants to step forward and put build_bazel_rules_nodejs
on the BCR.
I see, thanks for the pointers. Is it recommended to use aspect's rules over rules_nodejs? Is there any official suggestion, plans to merge or deprecate?
All the maintainers are now working on aspect rules_js so yes, over the course of the next months as it matures past 1.0 I'd recommend users migrate. It's a rewrite and so much too breaking to make it a 6.0 of rules_nodejs.
build_bazel_rules_nodejs will probably never go on the BCR and is no longer in this repo at HEAD.