5

I tried posting this question to Scala Users but no reply yet. How does one go about working with the new experimental Scala 3 with Scala.JS? I can’t find cogent instructions.

Shockingly there’s nothing I can find on this topic on the Internet.

For example I’ve read (and verified in the Scala 3 source code) that there’s no plugin as the integration is compiled into the dotc compiler. So what I am I suppose to do with the instructions on the Scala.js website that instruct me to add a plugin to the build files?

Shelby Moore III
  • 6,063
  • 1
  • 33
  • 36

1 Answers1

9

You follow exactly the same instructions as for Scala 2. The only thing you change is scalaVersion to some 3.x version.

There is no compiler plugin, but there is still an sbt plugin. So nothing changes.

sjrd
  • 21,805
  • 2
  • 61
  • 91
  • Thank you. And thank you for putting this answer when it can be found by those searching. Is the Sbtplugin for activating the Scala.JS linker? – Shelby Moore III May 14 '22 at 16:32
  • 2
    The linker, yes, as well as running/testing with a JavaScript runtime instead of a JVM. – sjrd May 14 '22 at 16:56