Closed ptrdom closed 2 years ago
Thanks for the suggestion.
I'm afraid this does not make sense to me. At least it looks completely out of scope for scalajs-bundler. scalajs-bundler is not in charge of installing/managing Node.js any more than sbt-scalajs is. Or equivalent, not any more than sbt is in charge of installing/managing JVMs. This is supposed to be done completely outside of sbt.
If you feel strongly about it, you can always write a separate sbt plugin to do that.
This is a bit different from JVM in the fact that JVM is not as tightly coupled with sbt as npm is with Node - you typically install them together and community typically uses NVM for that. I guess that with this feature I simply wanted to make so that scalajs-bundler
could fully manage the Javascript build cycle, but you are correct - that could be done with a separate plugin.
https://github.com/nvm-sh/nvm https://github.com/coreybutler/nvm-windows
NVM is used to manage
Node
andnpm
versions, what typically happens when a project is not set to a specific version of these tools is that it eventually breaks in compilation or runtime, because different developers and CI/CD machines start using incompatible versions without any means of control. It would be as if inScala
we would not be able to setsbt
orScala
versions in our projects.I think this would need a new setting to be added, maybe
useNVM
, which would accept aString
of aNode
version as a parameter.