Skip to content

Commit

Permalink
Set up scalaJSLinkerConfig without regard for hasMain parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
reid-spencer committed Oct 4, 2024
1 parent fe85c11 commit cb5f973
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions src/main/scala/com/ossuminc/sbt/helpers/Javascript.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,16 @@ object Javascript extends AutoPluginHelper {
// for an application with a main method
scalaJSUseMainModuleInitializer := hasMain,
scalaJSLinkerConfig ~= {
if (hasMain) {
_.withOptimizer(forProd)
} else {
_.withOptimizer(forProd)
.withModuleKind({
if (withCommonJSModule) {
ModuleKind.CommonJSModule
} else {
ModuleKind.ESModule
}
})
.withSourceMap(true)
.withJSHeader("// " + header + "\n")
}
_.withOptimizer(forProd)
.withModuleKind({
if (withCommonJSModule) {
ModuleKind.CommonJSModule
} else {
ModuleKind.ESModule
}
})
.withSourceMap(!forProd)
.withJSHeader("// " + header + "\n")
},
libraryDependencies ++= Seq(
"io.github.cquiroz" %%% "scala-java-time" % "2.6.0",
Expand Down

0 comments on commit cb5f973

Please sign in to comment.