1
1
package sri .sbt .platform
2
2
3
- import org .scalajs .core .tools .linker .backend .ModuleKind
4
3
import sbt .Keys ._
5
4
import sbt ._
6
5
import org .scalajs .sbtplugin .ScalaJSPlugin .autoImport ._
7
- import org .scalajs .sbtplugin .ScalaJSPluginInternal
6
+ import org .scalajs .sbtplugin .ScalaJSPlugin
8
7
9
8
object ConfigBuilder {
10
9
@@ -52,7 +51,7 @@ object ConfigBuilder {
52
51
val entryFile = getEntryFileName(config)
53
52
inConfig(config)(
54
53
Defaults .compileSettings ++
55
- ScalaJSPluginInternal .scalaJSCompileSettings ++ Seq (
54
+ ScalaJSPlugin .compileConfigSettings ++ Seq (
56
55
discoveredMainClasses := (discoveredMainClasses in Compile ).value,
57
56
mainClass := (mainClass in Compile ).value,
58
57
console := (console in Compile ).value,
@@ -62,13 +61,15 @@ object ConfigBuilder {
62
61
artifactPath in fullOptJS := baseDirectory.value / aPath,
63
62
dev := {
64
63
val indexFile = baseDirectory.value / entryFile
64
+ IO .touch(indexFile, setModified = false )
65
65
val indexContent = IO .read(indexFile)
66
66
(fastOptJS in config).value.data
67
67
val launcher = s """ require("./ $aPath"); """
68
68
if (! indexContent.contains(launcher)) IO .append(indexFile, launcher)
69
69
},
70
70
prod := {
71
71
val indexFile = baseDirectory.value / entryFile
72
+ IO .touch(indexFile, setModified = false )
72
73
val indexContent = IO .read(indexFile)
73
74
(fullOptJS in config).value.data
74
75
val launcher = s """ require("./ $aPath"); """
0 commit comments