rules_js icon indicating copy to clipboard operation
rules_js copied to clipboard

[FR]: Transitions on compilation modes for npm packages

Open stoiky opened this issue 4 months ago • 1 comments

What is the current behavior?

When building with different compilation modes users will download/extract npm packages for each one. When they use different compilation modes, there's no transition in place for external packages so users actually get at least 3 layouts of third party packages.

Describe the feature

We have a set up where cpp developers would use -c dbg and other teams might do -c opt for various reasons, but mostly they would always default on fastbuild.

As with pnpm workspaces we might want custom control over js_library(pkg) for external packages it would be great to always transition to one particular compilation mode (maybe opt as the default?)

Pending issues:

stoiky avatar Dec 10 '25 09:12 stoiky

Agreed - it's interesting how bazel_env.bzl always transitions to a stable config for downloaded tools. We could have a custom bazel-out/npm/bin for example

alexeagle avatar Dec 11 '25 22:12 alexeagle