scala-js / scala-js-env-phantomjs   1.0.0

BSD 3-clause "New" or "Revised" License GitHub

PhantomJS environment for Scala.js

Scala versions: 2.13 2.12 2.11
sbt plugins: 1.0


scalajs-env-phantomjs is a JavaScript environment for Scala.js (a JSEnv) running PhantomJS.

This repository contains scalajs-env-phantomjs for Scala.js 1.x. In Scala.js 0.6.x, the PhantomJS environment is part of the core distribution.


// project/plugins.sbt
addSbtPlugin("org.scala-js" % "sbt-scalajs-env-phantomjs" % "1.0.0")

// build.sbt (inside .settings(...) for multi-project builds)
jsEnv := PhantomJSEnv().value
scalaJSLinkerConfig ~= { _.withESFeatures(_.withUseECMAScript2015(false)) }

The last line is needed because Scala.js emits ECMAScript 2015 code by default, but PhantomJS only supports ES 5.1.

See the Scaladoc for other configuration options.