Scala.js project structure
Scala.js comes with an sbt plugin that facilitates compiling, running and testing with Scala.js. For a quick start, have a look at our bootstrapping skeleton.
Load the sbt plugin (project/plugins.sbt)
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.5")Enable the plugin on the sbt project (build.sbt):
lazy val root = project.
enablePlugins(ScalaJSPlugin)If you are using a Build.scala definition, import the following:
import org.scalajs.sbtplugin.ScalaJSPlugin
import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._Next we’ll look into the building process in more detail.