scala-js / vite-plugin-scalajs

Vite plugin for integration of Scala.js
Apache License 2.0
51 stars 9 forks source link

Running sbt slow down npm run dev #9

Closed user753 closed 1 year ago

user753 commented 1 year ago

According to https://github.com/scala-js/vite-plugin-scalajs/blob/main/index.ts#LL65C7-L65C23 plugin runs sbt to get scalaJSOutputDir Maybe scalaJSOutputDir could be added to options and it wouldn't be necessary to run sbt every time? vite usually starts instantly in js projects so it's a little annoying.

sjrd commented 1 year ago

It's a trade-off. Running sbt makes things work out of the box, without having to guess in which directly sbt is going to put things.

If you don't want that, and you prefer hard-coding the path yourself, you're better off not using the plugin at all, and instead use Vite's alias.resolve config.

andriygm commented 1 year ago

Would using SBT's thin client help here?