Releases: vmunier/sbt-web-scalajs
v1.3.0.
v1.2.0.
Highlights
- Upgrade to Scala.js
v1.5.1
- Use
fastLinkJS
/fullLinkJS
instead offastOptJS
/fullOptS
- Add support for Scala 3
- Drop support for SBT
v0.13.x
and Scala.jsv0.6.x
- Remove the sbt-jsdependencies plugin
- Publish to Sonatype, using sbt-ci-release. Stop publishing to Bintray. JFrog are sunsetting Bintray https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/
Breaking changes
There are two breaking changes when upgrading from sbt-web-scalajs v1.1.0
to v1.2.0
:
-
Use
fastLinkJS
/fullLinkJS
instead offastOptJS
/fullOptS
sbt-web-scalajs is now using
fastLinkJS
/fullLinkJS
instead offastOptJS
/fullOptS
.The new Scala.js'
fastLinkJS
task writes the JavaScript code to a directory. With the default options, it writes a single filemain.js
. Let's say we have aclient
Scala.js project,fastLinkJS
writes a single filemain.js
to aclient-fastopt
directory (client-fastopt/main.js
). Previous versions of sbt-web-scalajs usedfastOptJS
, which wrote aclient-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 requestGET /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
tov1.2.0
, for:- Play: https://github.com/vmunier/play-scalajs.g8/pull/120/files
- Akka HTTP: https://github.com/vmunier/akka-http-scalajs.g8/pull/70/files
In the above diffs, we removed the
scalajs-scripts
dependency and added afindScript.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
pluginThe 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
- Fixes #105
v1.1.0-0.6
- Published for Scala.js
v0.6.x
.
v1.1.0.
Highlights
- Look up the
scalaJSStage
setting from the Scala.js projects to know whether to runfastOptJS
orfullOptJS
. - Follow Scala.js' defaults, which enable Source Maps for both
fastOptJS
andfullOptJS
. - Put the ScalaJSWeb's
sourceMappings
setting infastOptJS
/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 runfastOptJS
orfullOptJS
The plugin used to parse the SBT command line to know whether
fastOptJS
orfullOptJS
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 runsfastOptJS
whenscalaJSStage
equals toFastOptStage
(default value) and runsfullOptJS
whenscalaJSStage
equals toFullOptStage
.This means that
scalaJSStage
needs to be set toFullOptStage
in the Scala.js projects for which you wishfullOptJS
to be run. As an example, the following command would setFullOptStage
for all the Scala.js projects from the build and runfullOptJS
before packaging your application:sbt 'set scalaJSStage in Global := FullOptStage' universal:packageBin
-
Source Maps are enabled in
fullOptJS
by defaultBy default, sbt-web-scalajs
v1.0.x
disabled Source Maps infullOptJS
.
sbt-web-scalajsv1.1.0
now follows Scala.js' defaults, which enable Source Maps for bothfastOptJS
andfullOptJS
.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.
- Fixes #55: Source map files (.map) should not been present inside JAR when using prod commands.
- Upgrade to Scala.js
v0.6.32
and SBTv1.3.8
. - Published for Scala.js
v0.6.x
.
v1.0.11.
v1.0.10-0.6.
- Upgrade to Scala.js
v0.6.31
. - Published for Scala.js
v0.6.x
.
v1.0.10.
v1.0.9-0.6.
- Upgrade to Scala.js
v0.6.27
. - Published for Scala.js
v0.6.x
.