Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Providing nodeExecCommand setting #427

Open
ptrdom opened this issue May 26, 2022 · 4 comments
Open

Providing nodeExecCommand setting #427

ptrdom opened this issue May 26, 2022 · 4 comments

Comments

@ptrdom
Copy link
Contributor

ptrdom commented May 26, 2022

This is somewhat related to #418 - instead of directly supporting some node version manager, we could expose a setting that would allow users to set a node executable, similar to how sbt-native-packager does it with dockerExecCommand. Then users of scalajs-bundler could wire in for example https://github.com/jasongin/nvs by setting nodeExecCommand to nvs exec <ver>.

How does this sound @sjrd?

@sjrd
Copy link
Collaborator

sjrd commented May 31, 2022

This is something that can be done with a custom NodeJSEnv.Config:

import org.scalajs.jsenv.nodejs.NodeJSEnv

jsEnv := {
  new NodeJSEnv(NodeJSEnv.Config()
    .withExecutable("nvs")
    .withArgs(List("exec", ver)))
}

@ptrdom
Copy link
Contributor Author

ptrdom commented May 31, 2022

When suggesting this I mainly had interactions with Webpack in mind:

@sjrd
Copy link
Collaborator

sjrd commented Jun 2, 2022

Wouldn't that be possible to do in user space using #420, then?

@ptrdom
Copy link
Contributor Author

ptrdom commented Jun 2, 2022

No, because that PR does not expose these bundler related node invocations that I have linked above. New setting is the only way. Do not see a problem here - it is a beneficial change that is easily backwards compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants