1

I'm trying to get Scala.js working with the bootstrap library. Adding the js file was easy and straight forward:

jsDependencies +="org.webjars" % "bootstrap" % "3.3.7-1" / "bootstrap.js" minified "bootstrap.min.js"

But now I've problems to add the bootstrap.css file. I tried this line:

 "org.webjars" % "bootstrap" % "3.3.7-1" / "bootstrap.css" minified "bootstrap.min.css"

But adding a css file to the jsDependencies doesn't seem to work:

[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

Can anybody tell me how to get this working properly?

2 Answers 2

1

As far as I know, there's no Scala.js shortcut for it -- I just include the CSS manually in my HTML, just as you would in an ordinary non-Scala.js webpage.

jsDependencies has nothing to do with CSS, and really can't -- it expects to be working solely with JavaScript.

Sign up to request clarification or add additional context in comments.

Comments

1

Weppack is able to inject CSS into your HTML page. You might want to look at scalajs-bundler, a scala-js webpack wrapper.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.