-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
37 lines (30 loc) · 1.42 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
import org.scalajs.linker.interface.ModuleSplitStyle
import sbt.librarymanagement
lazy val `test-vite` = project.in(file("."))
.enablePlugins(ScalaJSPlugin) // Enable the Scala.js plugin in this project
.enablePlugins(ScalablyTypedConverterExternalNpmPlugin)
.settings(
scalaVersion := "3.6.2",
scalacOptions ++= Seq("-encoding", "utf-8", "-deprecation", "-feature"),
// 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 "testvite" 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("testvite")))
},
// Depend on Laminar
libraryDependencies += "com.raquo" %%% "laminar" % "15.0.1",
libraryDependencies += "com.lihaoyi" %%% "upickle" % "4.1.0", // SBT
libraryDependencies += "org.openmole" %%% "scala-js-plotlyjs" % "1.8.1",
//stEnableLongApplyMethod := true,
//stIgnore += "plotly.js-dist-min",
// Tell ScalablyTyped that we manage `npm install` ourselves
externalNpm := baseDirectory.value
)