https://pantsbuild.org/ logo
m

modern-daybreak-51953

12/27/2018, 3:00 PM
Hi, anyone here know the stories around using pants for big scala.js projects using webpack to manage JavaScript dependencies? We are using
sbt
with
scalajs-bundler
plugin which offers a bundling mode https://scalacenter.github.io/scalajs-bundler/reference.html#bundling-mode-library-only that would not make webpack choke on the large JS output from scala.js. I am wondering if there is something similar in pants?
a

aloof-angle-91616

12/28/2018, 3:49 AM
if it's not in the help then i suspect not, but from that page it looks like it's not hard to tell webpack to do this -- i don't know how webpack is invoked with pants's scala.js support, but adding this option and making webpack act accordingly can be done either just in your repo with a pants plugin, or in whatever task does webpack in
contrib/scalajs/
in the main pants repo (if there is such a task). https://www.pantsbuild.org/dev_tasks.html is pretty useful for this.
m

modern-daybreak-51953

12/28/2018, 6:53 PM
thanks, will look into it
a

aloof-angle-91616

12/28/2018, 6:53 PM
if the next steps aren't clear to you at any point please let me know and i can devote more time than i had yesterday to respond!
8 Views