By default, the
-fullopt.js files produced by Scala.js are top-level scripts, and their
@JSExported stuff are sent to the global scope.
Currently, only the CommonJS module format is supported, with the following sbt setting:
Important: Using this setting is incompatible with the setting
persistLauncher := true.
When emitting a module, top-level
@JSExport are really exported from the Scala.js module.
Moreover, you can use top-level
For example, consider the following definitions:
Once compiled under