Skip to content

Files

Latest commit

1db0fc2 · Feb 14, 2020

History

History
23 lines (16 loc) · 858 Bytes

README.md

File metadata and controls

23 lines (16 loc) · 858 Bytes

scalajs-env-phantomjs

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.

Setup

// 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.