-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
51 lines (46 loc) · 1.61 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import org.scalajs.linker.interface.ModuleSplitStyle
val scala3Version = "3.4.3"
val circeVersion = "0.14.10"
lazy val magicvar = project
.in(file("."))
.enablePlugins(ScalaJSPlugin) // Enable the Scala.js plugin in this project
.settings(
scalaVersion := scala3Version,
scalacOptions ++= Seq(
"-language:strictEquality",
"-source:future",
"-feature",
"-deprecation",
"-Ykind-projector:underscores",
"-Ysafe-init",
"-Xmax-inlines:256",
"-language:implicitConversions",
"-Wunused:all",
"-Wvalue-discard"
),
// 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 "livechart" 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("magicvar")))
},
/* Depend on the scalajs-dom library.
* It provides static types for the browser DOM APIs.
*/
libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-dom" % "2.8.0",
"com.raquo" %%% "laminar" % "17.1.0"
),
libraryDependencies ++= Seq(
"io.circe" %%% "circe-core",
"io.circe" %%% "circe-generic",
"io.circe" %%% "circe-parser"
).map(_ % circeVersion)
)