Project setup page is either unclear or wrong
bwbecker opened this issue · 0 comments
bwbecker commented
The project setup page (https://www.scala-js.org/doc/project/) says the built.sbt
file should look like
lazy val root = project.
enablePlugins(ScalaJSPlugin)
However, when I do this and issue the run
command, it doesn't generate any .sjsir
files. I think it's running against the JVM.
However, when I change the suggested code to
lazy val root = project
.in(file("."))
.enablePlugins(ScalaJSPlugin)
it generates the .sjsir
files.
Furthermore, the next page, Building the Application, suggests adding scalaJSUseMainModuleInitializer := true
. Based on the Basic Tutorial and the information on the page, one might think that just inserting it at the top level of build.sbt
would work. But it needs to go inside .settings
:
lazy val root = project
.in(file("."))
.enablePlugins(ScalaJSPlugin)
.settings(
scalaJSUseMainModuleInitializer := true
)
I would expect new users to find this confusing.