Skip to content

keynmol/scalajs-scala-cli-vite-template

Repository files navigation

Scala.js ❤️ Scala CLI ❤️ Vite

Minimal template to get you started with Scala.js, Scala CLI and Vite.

  1. Run npm install
  2. npm run dev - this will run both the Vite's dev server and Scala.js continuous packaging, watching for any file changes
  3. Happy hacking! Your project will reload automatically as you make changes to index.scala

Demo

CleanShot.2024-05-20.at.19.35.03.mp4

Caveats

Note that so far Scala CLI reloading is slower than what I usually experience in SBT. It's still fine, but if you want the fastest experience available, consider using the Vite plugin and the SBT Vite template (sbt new scala-js/vite.g8)