Since the sbt plugin is able to detect the JSApp
object of the application, there is no
need to repeat this in the HTML file. If you add the following setting to your build.sbt
, sbt will create a
scala-js-tutorial-launcher.js
file which calls the main method:
persistLauncher := true
If you want to change selection, open document below and click on "Move attachment"
Basic tutorial - Scala.jsFullOptStage
(by default, the stage is FastOptStage )
Automatically Creating a Launcher
Before creating another HTML file which includes the fully optimized JavaScript, we are going to introduce another
feature of the sbt plugin. <span>Since the sbt plugin is able to detect the JSApp object of the application, there is no
need to repeat this in the HTML file. If you add the following setting to your build.sbt , sbt will create a
scala-js-tutorial-launcher.js file which calls the main method:
persistLauncher := true
In our HTML page, we can now include this file instead of the manual launcher:
<span><script Summary
status | not read | | reprioritisations | |
---|
last reprioritisation on | | | suggested re-reading day | |
---|
started reading on | | | finished reading on | |
---|
Details