编译时出现WDS警告

时间:2019-07-03 12:31:14

标签: webpack-dev-server scala.js scalajs-bundler

如果我按如下所示定义一个纯scalajs build.sbt,但没有实际的scala代码(App是一个空类):

enablePlugins(ScalaJSBundlerPlugin)

lazy val repro = project.in(file(".")).settings(

    name := "Repro",
    scalaVersion := "2.12.8",

    libraryDependencies ++= Seq(
        "org.scala-js" %%% "scalajs-dom" % "0.9.6"
    ),

    mainClass in Compile := Some("App"),

    scalaJSUseMainModuleInitializer := true,

    webpackDevServerPort := 3000
)

具有以下两个插件:

addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.27")

addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.15.0")

然后,每当我运行fastOptJS :: startWebpackDevServer时,我都会收到如下警告。我有什么办法可以摆脱这些警告?

  

[WDS]编译时警告。客户:147

     

./ repro-fastopt.js(发出的值,而不是Error的实例)   找不到源文件   'https://raw.githubusercontent.com/scala-js/scala-js/v1.0.0-M7/javalanglib/src/main/scala/java/lang/Boolean.scala':   错误:无法解决   './https://raw.githubusercontent.com/scala-js/scala-js/v1.0.0-M7/javalanglib/src/main/scala/java/lang/Boolean.scala'   在'/home/des/workspace/repro/target/scala-2.12/scalajs-bundler/main'中   @ multi(webpack)-dev-server / client?http://localhost:3000   ./repro-fastopt.js客户端:153

     

./ repro-fastopt.js(发出的值,而不是Error的实例)   找不到源文件   'https://raw.githubusercontent.com/scala-js/scala-js/v1.0.0-M7/javalanglib/src/main/scala/java/lang/Byte.scala':   错误:无法解决   './https://raw.githubusercontent.com/scala-js/scala-js/v1.0.0-M7/javalanglib/src/main/scala/java/lang/Byte.scala'   在'/home/des/workspace/repro/target/scala-2.12/scalajs-bundler/main'中   @ multi(webpack)-dev-server / client?http://localhost:3000   ./repro-fastopt.js客户端:153

     

./ repro-fastopt.js(发出的值,而不是Error的实例)   找不到源文件   'https://raw.githubusercontent.com/scala-js/scala-js/v1.0.0-M7/javalanglib/src/main/scala/java/lang/Character.scala':   错误:无法解决   './https://raw.githubusercontent.com/scala-js/scala-js/v1.0.0-M7/javalanglib/src/main/scala/java/lang/Character.scala'   在'/home/des/workspace/repro/target/scala-2.12/scalajs-bundler/main'中   @ multi(webpack)-dev-server / client?http://localhost:3000   ./repro-fastopt.js客户端:153

     

./ repro-fastopt.js(发出的值,而不是Error的实例)   找不到源文件   'https://raw.githubusercontent.com/scala-js/scala-js/v1.0.0-M7/javalanglib/src/main/scala/java/lang/Class.scala':   错误:无法解决   './https://raw.githubusercontent.com/scala-js/scala-js/v1.0.0-M7/javalanglib/src/main/scala/java/lang/Class.scala'   在'/home/des/workspace/repro/target/scala-2.12/scalajs-bundler/main'中   @ multi(webpack)-dev-server / client?http://localhost:3000   ./repro-fastopt.js客户端:153

     

./ repro-fastopt.js(发出的值,而不是Error的实例)   找不到源文件   'https://raw.githubusercontent.com/scala-js/scala-js/v1.0.0-M7/javalanglib/src/main/scala/java/lang/Double.scala':   错误:无法解决   './https://raw.githubusercontent.com/scala-js/scala-js/v1.0.0-M7/javalanglib/src/main/scala/java/lang/Double.scala'   在“ /home/des/workspace/repro/target/scala-2.12/scalajs-bundler/main”中

...

0 个答案:

没有答案