How do I run tests in Scala.js using a vite configuration?

18 Views Asked by At

The (relatively) new Scala.js vite plugin has made Scala frontend development so much easier than the sbt webpack bundler plugin I had been using previously. Unfortunately, however, I have not been able to figure out a way to make my JS library dependencies (via NPM) available to tests. With scalajs-bundler I was able to manage my npm dependencies within build.sbt using the npmDependency and npmDevDependency settings. I was eventually able to get sbt to bundle these dependencies into tests.

Is there a way to do this with vite? What is the best way to bundle my npm dependencies defined in package.json into my tests?

0

There are 0 best solutions below