Releases · vmunier/sbt-web-scalajs
v1.3.0. HighlightsN/A
Issuesv1.5.1
fastLinkJS
/fullLinkJS
instead of fastOptJS
/fullOptS
v0.13.x
and Scala.js v0.6.x
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
v0.6.x
.scalaJSStage
setting from the Scala.js projects to know whether to run fastOptJS
or fullOptJS
.fastOptJS
and fullOptJS
.sourceMappings
setting in fastOptJS
/fullOptJS
scopes.v1.1.0
.v1.1.x
.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))
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:
v0.6.32
and SBT v1.3.8
.v0.6.x
.v1.0.0-RC2
.v0.6.31
.v0.6.x
.v1.0.0-RC2
.v0.6.27
.v0.6.x
.v1.0.0-M7
.You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4