- Home
- Code Transpilers
- Scala.js
Scala.js
What it is
Scala.js is a free, open-source Scala-to-JavaScript compiler for applications running in browsers, Node.js, and serverless environments. The project also states that WebAssembly support is stable. Strong typing can catch mistakes such as mixing strings and numbers or misspelled method calls, while editor support shows type errors and inline method, argument, return-type, and documentation information. Incremental compilation is described with a 1–2 second turnaround, and generated JavaScript for a full application starts at 45 kB gzipped. Scala.js can use JavaScript libraries and APIs through static or dynamic typing. Listed integrations include React, Angular, Vue, Three.js, and Chart.js. Build options named in the documentation are sbt, scala-cli, Mill, and Gradle with a Scala.js plugin. Tutorials require Scala tools and Node.js and recommend VS Code with Metals. It is distributed under Apache License 2.0, with community help through Discord and Stack Overflow.
For and against
For
- Strong typing catches common coding mistakes
- Supports browser, Node.js, and serverless targets
- JavaScript library and API interoperability
- Incremental compilation with stated quick turnaround
- Multiple build tool options
Against
- 1.22.0 is not fully source-compatible with 1.21.x
- Scala tools and Node.js are prerequisites
- Community channels provide the listed support
The verdict
Scala.js offers a typed Scala workflow for JavaScript-targeted applications, with broad interoperability and build-tool choices. Developers should account for the noted source-compatibility change when upgrading.
Who it suits
It suits Scala developers building browser, Node.js, serverless, or WebAssembly applications who need JavaScript interoperability.
Plans and prices
Scala.js
Scala to JavaScript compiler · managed through a Scala build tool
Read 4 Oct 2026 · scala-js.org
On the record
- Build tools
- The documentation names sbt, scala-cli, Mill, and Gradle with a Scala.js plugin as supported build tool options.scala-js.org · read 4 Oct 2026
- Compatibility note
- The 1.22.0 release announcement says the release is not entirely backward source compatible with 1.21.x.scala-js.org · read 4 Oct 2026
- Correctness
- The site says Scala.js uses strong typing to catch mistakes such as mixing strings and numbers or calling methods with typos.scala-js.org · read 4 Oct 2026
- Development setup
- The tutorials list Scala development tools and Node.js as prerequisites and recommend VS Code with the Metals extension.scala-js.org · read 4 Oct 2026
- Editor support
- The homepage says editor support catches typos and type errors and provides inline method, argument, return type, and documentation information.scala-js.org · read 4 Oct 2026
- JavaScript interoperability
- Scala.js can use JavaScript libraries and interact with JavaScript APIs, with either statically or dynamically typed access.scala-js.org · read 4 Oct 2026
- Library ecosystem
- The libraries page lists facades and integrations for libraries including React, Angular, Vue, Three.js, and Chart.js.scala-js.org · read 4 Oct 2026
- License
- The project repository states that Scala.js is distributed under the Apache License Version 2.0.github.com · read 4 Oct 2026
- Output targets
- The June 2026 release announcement says WebAssembly support is stable; the homepage describes browser, Node.js, and serverless apps.scala-js.org · read 4 Oct 2026
- Performance
- The site describes incremental compilation with 1–2 second turnaround and generated JavaScript starting at 45 kB gzipped for a full application.scala-js.org · read 4 Oct 2026
- Purpose
- Scala.js is a Scala to JavaScript compiler for building applications that run in browsers, Node.js, and serverless environments.scala-js.org · read 4 Oct 2026
- Support
- The documentation directs users to the community for help, including Discord and Stack Overflow.scala-js.org · read 4 Oct 2026