forked from yurique/laminar-vite2-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
65 lines (58 loc) · 1.96 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import org.scalajs.linker.interface.ModuleSplitStyle
ThisBuild / scalaVersion := ScalaVersions.v213
//ThisBuild / scalaVersion := ScalaVersions.v3RC1
lazy val basicSettings = Seq(
scalacOptions ~= (_.filterNot(
Set(
"-Wdead-code",
"-Wunused:implicits",
"-Wunused:explicits",
"-Wunused:imports",
"-Wunused:params"
)
)),
libraryDependencies ++= Seq(
("com.raquo" %%% "laminar" % LibraryVersions.laminar).withDottyCompat(scalaVersion.value),
("io.frontroute" %%% "frontroute" % LibraryVersions.frontroute).withDottyCompat(scalaVersion.value),
("io.laminext" %%% "core" % LibraryVersions.laminext).withDottyCompat(scalaVersion.value),
("io.laminext" %%% "markdown" % LibraryVersions.laminext).withDottyCompat(scalaVersion.value),
"com.yurique" %%% "embedded-files-macro" % LibraryVersions.`embedded-files-macro`
)
)
lazy val common = project
.in(file("modules/common"))
.enablePlugins(ScalaJSPlugin)
.settings(basicSettings)
lazy val module1 = project
.in(file("modules/module1"))
.enablePlugins(ScalaJSPlugin, EmbeddedFilesPlugin)
.settings(basicSettings)
.settings(
embedTextGlobs := Seq("**/*.md"),
(Compile / sourceGenerators) += embedFiles
)
.dependsOn(common)
lazy val module2 = project
.in(file("modules/module2"))
.enablePlugins(ScalaJSPlugin)
.settings(basicSettings)
.dependsOn(common)
lazy val website = project
.in(file("modules/website"))
.enablePlugins(ScalaJSPlugin)
.settings(basicSettings)
.settings(
scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.ESModule) },
scalaJSLinkerConfig ~= { _.withModuleSplitStyle(ModuleSplitStyle.FewestModules) },
scalaJSLinkerConfig ~= { _.withSourceMap(false) },
scalaJSUseMainModuleInitializer := true
)
.dependsOn(module1, module2)
lazy val root = project
.in(file("."))
.settings(
name := "laminar-vite2-example"
)
.aggregate(
website
)