-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
32 lines (28 loc) · 1.23 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import org.scalajs.linker.interface.ModuleSplitStyle
lazy val vistyp = project
.in(file("."))
.enablePlugins(ScalaJSPlugin)
.settings(
scalaVersion := "3.3.3",
// Tell Scala.js that this is an application with a main method
scalaJSUseMainModuleInitializer := true,
/* Configure Scala.js to emit modules in the optimal way to
* connect to Vite's incremental reload.
* - emit ECMAScript modules
* - emit as many small modules as possible for classes in the "vistyp" package
* - emit as few (large) modules as possible for all other classes
* (in particular, for the standard library)
*/
scalaJSLinkerConfig ~= {
_.withModuleKind(ModuleKind.ESModule)
.withModuleSplitStyle(ModuleSplitStyle.SmallModulesFor(List("vistyp")))
},
/* Depend on the scalajs-dom library.
* It provides static types for the browser DOM APIs.
*/
libraryDependencies += "org.scala-js" %%% "scalajs-dom" % "2.8.0",
libraryDependencies += "com.raquo" %%% "laminar" % "17.0.0",
libraryDependencies += "com.lihaoyi" %%% "fastparse" % "3.1.1",
libraryDependencies += "com.lihaoyi" %%% "sourcecode" % "0.4.2",
libraryDependencies += "org.scalameta" %%% "munit" % "1.0.0" % Test,
)