scalacenter / scalajs-bundler

https://scalacenter.github.io/scalajs-bundler
Other
235 stars 101 forks source link

Fix webpack-dev-server logs with sbt 1.4.x #391

Closed vhiairrassary closed 3 years ago

vhiairrassary commented 3 years ago

Fixes https://github.com/scalacenter/scalajs-bundler/issues/389

Starting with sbt 1.4.x (see https://github.com/sbt/sbt/pull/5731) it is not possible to use the task logger after the task has been finished. But this is currently how we log outputs from webpack-dev-server.

This PR changes the logger to use the global one for this particular use case. I still be validate this is the recommended approach as there is not much documentation about it.

Manually tested with sbt 1.2.8, 1.3.13 and 1.4.6.

dispalt commented 3 years ago

I like this solution, it was frustrating when it went away. +1