scala-js / scala-js-env-jsdom-nodejs

Node.js with jsdom environment for Scala.js
BSD 3-Clause "New" or "Revised" License
8 stars 10 forks source link

Configurable `jsdom` directory in `JSDOMNodeJSEnv.Config` #53

Closed ptrdom closed 1 year ago

ptrdom commented 1 year ago

Would a PR to add this setting be accepted? Seems like it would definitely be useful and I cannot think of a simple workaround for it, scalajs-bundler even has its own copy of JSDOMNodeJSEnv to do it - https://github.com/scalacenter/scalajs-bundler/blob/main/sbt-scalajs-bundler/src/main/scala/scalajsbundler/JSDOMNodeJSEnv.scala.

gzm0 commented 1 year ago

Isn't it enough to set the NODE_PATH env variable for this?

https://stackoverflow.com/a/26293141/1149944

ptrdom commented 1 year ago

@gzm0 This indeed works, env variables are configurable in the current Config implementation. Thank you!