I have a cross building scala-js project with a client
, server
and shared
folder. If I add a lib
folder with some jars in the server
project folder I can reference the classes in the jars in my server code. But if add the lib
folder in the shared
project folder I can't reference the classes in my shared code. Can I add some command in my sbt build file to get my jars visible in my shared project or what should I do?
相关问题
- How do you actually run scalajs code in nodejs?
- Getting a scala stacktrace
- scala-js “@JSGlobalScope” error when migrating to
- How can I read a text file with scala.js?
- How to convert Scala.js application to CommonJS mo
相关文章
- How to convert Scala.js application to CommonJS mo
- What is the difference between scala.js vs jscala?
- 如何使用scalajs打捆使用客户端唯一的应用程序(How to use scalajs-bundl
- Is it possilble to a create type-safe library in S
- How to import UglifyJS from Scala.js?
- Access the JS this from scala.js
- Call jquery .each method from scala.js
- How to convert Map to Json object in Scala.js?
.jars should never be shared, since it is not the same .jar for Scala/JVM and Scala.js, even if they have the same source code.
If you have the two .jars for JVM and JS, you can put them in
shared/jvm/lib/
andshared/js/lib/
, respectively.(if you use
.crossType(CrossType.Pure)
, use.jvm
/.js
instead ofjvm
/js
)