diff --git a/doc/project/index.md b/doc/project/index.md index dddcf221..310bfd16 100644 --- a/doc/project/index.md +++ b/doc/project/index.md @@ -4,7 +4,7 @@ title: Scala.js project structure --- -Scala.js comes with an sbt plugin that facilitates compiling, running and testing with Scala.js. For a quick start, +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 [basic tutorial](../tutorial/basic/). Load the sbt plugin (`project/plugins.sbt`) @@ -16,8 +16,13 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % "{{ site.versions.scalaJS }}") Enable the plugin on the sbt project (`build.sbt`): {% highlight scala %} -lazy val root = project. - enablePlugins(ScalaJSPlugin) +lazy val root = project + .in(file(".")) + .enablePlugins(ScalaJSPlugin) + .settings( + // for an application with a main method + scalaJSUseMainModuleInitializer := true, + ) {% endhighlight %} If you are using a `Build.scala` definition, import the following: