我正在尝试让Scala.js使用bootstrap库。添加js文件非常简单直接:
jsDependencies +="org.webjars" % "bootstrap" % "3.3.7-1" / "bootstrap.js" minified "bootstrap.min.js"但是现在我在添加bootstrap.css文件时遇到了问题。我试过这句话:
"org.webjars" % "bootstrap" % "3.3.7-1" / "bootstrap.css" minified "bootstrap.min.css"但是,将css文件添加到jsDependencies似乎不起作用:
[error] (frontend/compile:resolvedJSDependencies) org.scalajs.core.tools.jsdep.JSLibResolveException: Some references to JS libraries could not be resolved:
[error] - Missing JS library: bootstrap.min.css
[error] originating from: frontend:compile
[error] - Missing JS library: bootstrap.css
[error] originating from: frontend:compile有人能告诉我如何让它正常工作吗?
发布于 2017-07-02 22:53:44
据我所知,没有Scala.js的快捷方式--我只是使用include the CSS manually in my HTML,就像在普通的非Scala.js网页中一样。
jsDependencies与CSS没有任何关系,也确实做不到--它希望只与JavaScript一起工作。
发布于 2017-09-24 16:09:12
Weppack能够将CSS注入到你的网页中。您可能想看看scalajs-bundler,一个scala-js的webpack包装器。
https://stackoverflow.com/questions/44871815
复制相似问题