Skip to content

Releases: vmunier/sbt-web-scalajs

v1.3.0.

14 Nov 19:14
Compare
Choose a tag to compare

Highlights

  • Upgrade to the latest libraries

Breaking changes

N/A

Issues

v1.2.0.

27 Apr 21:45
Compare
Choose a tag to compare

Highlights

Breaking changes

There are two breaking changes when upgrading from sbt-web-scalajs v1.1.0 to v1.2.0:

  • Use fastLinkJS/fullLinkJS instead of fastOptJS/fullOptS

    sbt-web-scalajs is now using fastLinkJS/fullLinkJS instead of fastOptJS/fullOptS.

    The new Scala.js' fastLinkJS task writes the JavaScript code to a directory. With the default options, it writes a single file main.js. Let's say we have a client Scala.js project, fastLinkJS writes a single file main.js to a client-fastopt directory (client-fastopt/main.js). Previous versions of sbt-web-scalajs used fastOptJS, which wrote a client-fastopt.js file with no directories.

    This means we need to update the HTTP path when getting the JavaScript files from the server. Where previously we requested GET /assets/client-fastopt.js, we now have to request GET /assets/client-fastopt/main.js.

    Have a look at the following git diff, showing the required changes when upgrading from sbt-web-scalajs v1.1.0 to v1.2.0, for:

    In the above diffs, we removed the scalajs-scripts dependency and added a findScript.scala.html template instead.
    findScript("client-opt/main.js", "client-fastopt/main.js") finds the first existing script and creates a <script> tag.

  • Remove the sbt-jsdependencies plugin

    The sbt-jsdependencies plugin has been removed from sbt-web-scalajs. Users can still add the plugin as part of their build if needed, and override the jsMappings task:

    Compile / fastLinkJS / jsMappings += toPathMapping((Compile / packageJSDependencies).value),
    Compile / fullLinkJS / jsMappings += toPathMapping((Compile / packageMinifiedJSDependencies).value),
    ...
    def toPathMapping(f: File): (File, String) = f -> f.getName
    

Issues

v1.1.0-0.6

01 Jun 21:06
Compare
Choose a tag to compare
  • Published for Scala.js v0.6.x.

v1.1.0.

01 Jun 21:18
Compare
Choose a tag to compare

Highlights

  • Look up the scalaJSStage setting from the Scala.js projects to know whether to run fastOptJS or fullOptJS.
  • Follow Scala.js' defaults, which enable Source Maps for both fastOptJS and fullOptJS.
  • Put the ScalaJSWeb's sourceMappings setting in fastOptJS/fullOptJS scopes.
  • Upgrade to Scala.js v1.1.0.
  • Published for Scala.js v1.1.x.

Breaking changes

There are two breaking changes when upgrading from sbt-web-scalajs v1.0.x to v1.1.0:

  • Set scalaJSStage to run fastOptJS or fullOptJS

    The plugin used to parse the SBT command line to know whether fastOptJS or fullOptJS should be run, which did not require any user interventions. However, parsing the command line has proven to be too fragile and sbt-web-scalajs failed to detect dev commands in certain scenarios.

    sbt-web-scalajs v1.1.0 no longer parses the command line, but simply looks up the Scala.js' scalaJSStage setting. sbt-web-scalajs runs fastOptJS when scalaJSStage equals to FastOptStage (default value) and runs fullOptJS when scalaJSStage equals to FullOptStage.

    This means that scalaJSStage needs to be set to FullOptStage in the Scala.js projects for which you wish fullOptJS to be run. As an example, the following command would set FullOptStage for all the Scala.js projects from the build and run fullOptJS before packaging your application:

    sbt 'set scalaJSStage in Global := FullOptStage' universal:packageBin
    
  • Source Maps are enabled in fullOptJS by default

    By default, sbt-web-scalajs v1.0.x disabled Source Maps in fullOptJS.
    sbt-web-scalajs v1.1.0 now follows Scala.js' defaults, which enable Source Maps for both fastOptJS and fullOptJS.

    Source Maps can be disabled in fullOptJS by adding the following line to the Scala.js project's settings:

    scalaJSLinkerConfig in (Compile, fullOptJS) ~= (_.withSourceMap(false))
    

Issues

Fix issues related to the detection of dev commands. sbt-web-scalajs v1.1.0 now relies on scalaJSStage to know whether fastOptJS or fullOptJS should be run:

v1.0.11-0.6.

18 Feb 20:57
Compare
Choose a tag to compare
  • Fixes #55: Source map files (.map) should not been present inside JAR when using prod commands.
  • Upgrade to Scala.js v0.6.32 and SBT v1.3.8.
  • Published for Scala.js v0.6.x.

v1.0.11.

18 Feb 20:58
Compare
Choose a tag to compare
  • Published for Scala.js v1.0.0-RC2.

v1.0.10-0.6.

15 Dec 19:17
Compare
Choose a tag to compare
  • Upgrade to Scala.js v0.6.31.
  • Published for Scala.js v0.6.x.

v1.0.10.

15 Dec 19:18
Compare
Choose a tag to compare
  • Published for Scala.js v1.0.0-RC2.

v1.0.9-0.6.

08 May 21:35
Compare
Choose a tag to compare
  • Upgrade to Scala.js v0.6.27.
  • Published for Scala.js v0.6.x.

v1.0.9.

08 May 21:37
Compare
Choose a tag to compare
  • Published for Scala.js v1.0.0-M7.