当我几个月前第一次发现webJars时,我对此持怀疑态度,因为这些构建/构建系统中的一些构建/构建系统的复杂性非常大,并且考虑到js文件发布的频率,这将是一种处理客户端依赖关系的可行方法.第二个问题当然不是有根据的,但是经过花费近36个小时的时间,我觉得第一个关心是无庸置疑的,现在尝试使用大约10个scss / css / less-type webJars和8个JS webJars来生活在一个jsDependencies屋顶下.
当我遇到JS依赖关系3,4或5的时候,我发现了这样一个可笑的时间循环:
1.“哦,诺斯!fastOptJS失败了,因为有一些随机文件在webjar中也被命名为一个依赖关系!”
[trace] Stack trace suppressed: run last client/compile:resolvedJSDependencies for the full output. [error] (client/compile:resolvedJSDependencies) org.scalajs.core.tools.jsdep.JSLibResolveException: Some references to JS libraries Could not be resolved: [error] - Ambiguous reference to a JS library: bootstrap.min.js [error] Possible paths found on the classpath: [error] - meta-inf/resources/webjars/bootstrap/3.3.6/js/bootstrap.min.js [error] - meta-inf/resources/webjars/bootstrap3-dialog/1.34.4/examples/assets/bootstrap/js/bootstrap.min.js [error] originating from: client:compile,client:compile,client:compile [error] - Ambiguous reference to a JS library: bootstrap.js [error] Possible paths found on the classpath: [error] - meta-inf/resources/webjars/bootstrap3-dialog/1.34.4/examples/assets/bootstrap/js/bootstrap.js [error] - meta-inf/resources/webjars/bootstrap/3.3.6/js/bootstrap.js [error] originating from: client:compile,client:compile
lazy val webjarbs = "org.webjars" % "bootstrap" % version.bootstrap / s"${version.bootstrap}/bootstrap.js" minified s"${version.bootstrap}/bootstrap.min.js" dependsOn "jquery.js" commonjsName "bootstrap"
“哦不,fastOptJS失败了!”
[trace] Stack trace suppressed: run last client/compile:resolvedJSDependencies for the full output. [error] (client/compile:resolvedJSDependencies) org.scalajs.core.tools.jsdep.JSLibResolveException: Some references to JS libraries Could not be resolved: [error] - Missing JS library: 3.3.6/bootstrap.js [error] originating from: client:compile,client:compile [error] - Missing JS library: 3.3.6/bootstrap.min.js [error] originating from: client:compile,client:compile
gg男孩.
这样一来又一遍又一遍,然后我就要开始做
lazy val bs_sidebar = ( "org.webjars" % "bootstrap-sidebar" % version.bs_sidebar intransitive()) / "js/sidebar.js" dependsOn(s"bootstrap.js",s"bootstrap.min.js")
现在我甚至没有使用webjar,但它有一个名为X的jsependencies,我不能改变那个…
题
嗯?如果我只是做了我以前做的工作,而是将应用程序建立在一些巨大的文件或一组文件中,然后将其加载到构建中的依赖项?我有一个在线的概念证明,我得到它的工作(我认为是https://github.com/wav/material-ui-scalajs-react/blob/master/src/main/scala/wav/web/muiwrapper/package.scala)几乎工作,并给了我的想法.
我知道npm的工作比sbt好多了,我仍然可以把它放到我的包中…有什么不利的地方,我是否缺少关于sbt的东西?
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。