Scala.js

What Scala.js is
Scala.js compiles Scala into JavaScript for applications that run in browsers, Node.js, and serverless environments. The project also says WebAssembly support is stable. Scala's strong typing can catch issues such as mixing strings with numbers or calling a misspelled method, while editor support can flag errors and show inline information about methods, arguments, return types, and documentation. Incremental compilation is described as taking 1–2 seconds, and generated JavaScript for a full application starts at 45 kB gzipped. Scala.js works with JavaScript libraries and APIs through either statically or dynamically typed access. Listed library integrations include React, Angular, Vue, Three.js, and Chart.js. Build options include sbt, scala-cli, Mill, and Gradle with a Scala.js plugin. Tutorials list Scala development tools and Node.js as prerequisites and recommend VS Code with Metals. The project is free and open source under Apache License 2.0, with community help through Discord and Stack Overflow. The 1.22.0 release is not entirely backward source compatible with 1.21.x.
Who it suits
Scala.js suits Scala developers building browser, Node.js, or serverless applications who need JavaScript interoperability. It may also suit teams targeting WebAssembly or using the listed Scala build tools.
What it does well
- Compiles Scala applications for browsers, Node.js, and serverless environments.
- Supports JavaScript libraries and APIs.
- Offers four named build tool options.
- Editor support flags typos and type errors.
- Free under Apache License 2.0.
What to know first
- The 1.22.0 release is not entirely source compatible with 1.21.x.
- Tutorials list Scala development tools and Node.js as prerequisites.
Limits
The 1.22.0 release is not entirely backward source compatible with 1.21.x.
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| Scala.js | Scala to JavaScript compiler · managed through a Scala build tool | Free |
As scala-js.org lists them, read 4 Oct 2026. The maker's own page has the final word.
Getting started
- Visit the Scala.js website and follow the tutorials.
- Install Scala development tools and Node.js.
- Choose a supported build tool: sbt, scala-cli, Mill, or Gradle with its Scala.js plugin.
- Consider VS Code with the Metals extension for editor support.
- Use the community on Discord or Stack Overflow for help.
Verdict
Scala.js brings Scala typing and tooling to JavaScript development, with listed routes to interoperate with JavaScript libraries. Review the 1.22.0 compatibility note if upgrading from 1.21.x.
Questions
How much does Scala.js cost?
Scala.js is free; the listed plan price is free.
Is Scala.js open source?
Yes. The project repository states that it is distributed under the Apache License Version 2.0.
What can I build with Scala.js?
It compiles Scala for applications that run in browsers, Node.js, and serverless environments. WebAssembly support is described as stable.
Can Scala.js use JavaScript libraries?
Yes. It can use JavaScript libraries and APIs through statically or dynamically typed access. Listed integrations include React, Angular, Vue, Three.js, and Chart.js.
Which build tools are supported?
Documentation names sbt, scala-cli, Mill, and Gradle with a Scala.js plugin.
Where can I get help?
The documentation points users to community support through Discord and Stack Overflow.
Facts from Scala.js's own pages
- Build tools
- The documentation names sbt, scala-cli, Mill, and Gradle with a Scala.js plugin as supported build tool options. · scala-js.org, 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, 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, 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, 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, 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, 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, 4 Oct 2026
- License
- The project repository states that Scala.js is distributed under the Apache License Version 2.0. · github.com, 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, 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, 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, 4 Oct 2026
- Support
- The documentation directs users to the community for help, including Discord and Stack Overflow. · scala-js.org, 4 Oct 2026
Where Scala.js stands on Freedom251
- Code Transpilers#14 of 28
