-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
..but had to go without modules scala-js/scala-js-env-jsdom-nodejs#56
- Loading branch information
Showing
6 changed files
with
518 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,16 @@ | ||
import org.scalajs.linker.interface.ModuleSplitStyle | ||
import org.scalajs.linker.interface.ModuleSplitStyle.* | ||
|
||
lazy val sueppchen = project.in(file(".")) | ||
.enablePlugins(ScalaJSPlugin) // Enable the Scala.js plugin in this project | ||
.settings( | ||
scalaVersion := "3.2.2", | ||
.enablePlugins(ScalaJSPlugin) // Enable the Scala.js plugin in this project | ||
.settings( | ||
scalaVersion := "3.2.2", | ||
libraryDependencies += "com.raquo" %%% "laminar" % "15.0.1", | ||
|
||
scalaJSUseMainModuleInitializer := true, | ||
scalaJSUseMainModuleInitializer := true, | ||
scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.ESModule) | ||
.withModuleSplitStyle(SmallModulesFor(List("sueppchen"))) }, | ||
|
||
/* Configure Scala.js to emit modules in the optimal way to | ||
* connect to Vite's incremental reload. | ||
* - emit as many small modules as possible for classes in the "sueppchen" package | ||
* - emit as few (large) modules as possible for all other classes | ||
*/ | ||
scalaJSLinkerConfig ~= { | ||
_.withModuleKind(ModuleKind.ESModule) | ||
.withModuleSplitStyle( | ||
ModuleSplitStyle.SmallModulesFor(List("sueppchen"))) | ||
}, | ||
|
||
libraryDependencies += "com.raquo" %%% "laminar" % "15.0.1", | ||
|
||
|
||
) | ||
libraryDependencies += "org.scalatest" %%% "scalatest" % "3.2.16" % "test", | ||
Test / jsEnv := new org.scalajs.jsenv.jsdomnodejs.JSDOMNodeJSEnv(), | ||
Test / scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.NoModule).withModuleSplitStyle(FewestModules) }, | ||
) |
Oops, something went wrong.