Questions tagged [scalajs-bundler]

Questions related to scalajs-bundler.

is a module bundler for projects that use packages.

You can find more information on the GitHub repo : https://scalacenter.github.io/scalajs-bundler/

38 questions
0
votes
1 answer

How can I bundle my index.html in my webpack bundle

I have defined a very basic project that uses the scalajs-bundler plugin. I have defined an index.html file in my src/resources folder. Is there a way I can configure it so that this is also copied to the "target/.../scalajs-bundler/main" folder…
user79074
  • 4,937
  • 5
  • 29
  • 57
0
votes
1 answer

Cannot get any scalajs-bundler samples to work

If I download a clone of the scalajs-bundler project and navigate to any of the sbt-test projects I cannot get any of them to work - for example the facade project. When I enter the sbt command I get the following error: [error]…
user79074
  • 4,937
  • 5
  • 29
  • 57
0
votes
1 answer

scalajs-bundler does not create the *-fastopt-bundler.js.map" as value

When running val bundle = (Compile / fastOptJS / webpack).value in my build.sbt, I get the following files in the 'bundle': What I am missing is the -fastopt-bundler.js.map. If I check target/scala-2.12/scalajs-bundler/main the file is there! The…
pme
  • 14,156
  • 3
  • 52
  • 95
0
votes
1 answer

SBT: How to use `fastOptJS::webpack` in `build.sbt`?

I have in my build.sbt a copy task, like: copyTask := { val r = (Compile / fastOptJS).value val destinationPath = file("docs/_includes/scala-js-tutorial-fastopt.js").toPath java.nio.file.Files.copy(r.data.toPath, destinationPath,…
pme
  • 14,156
  • 3
  • 52
  • 95
0
votes
0 answers

How to use jQuery + Bootstrap.js in Scala.js with scalajs bundler?

1. Loading JQuery I have the following defined to interface with JQuery: @js.native sealed trait JQuery extends js.Any { def hide(): js.Any } @js.native @JSImport("jquery/dist/jquery.slim.min.js", "jQuery") object JQuery extends…
bbarker
  • 11,636
  • 9
  • 38
  • 62
0
votes
1 answer

How to specify the path when using @JSImport in Scala.js?

I have: $ ls -last /home/brandon/workspace/ced2ar/jsgen/target/scala-2.12/scalajs-bundler/main/node_modules/bootstrap/dist/js/bootstrap.min.js 40 -rw-r--r-- 1 brandon brandon 37045 Jul 25 2016…
bbarker
  • 11,636
  • 9
  • 38
  • 62
0
votes
1 answer

Cannot find node module fs when bundling module via scalajs-bundler

I'm trying to connect a scala.js app to a node module. I have not done this before. On fastOptJS::webpack I am getting a build failure with: target/scala-2.12/scalajs-bundler/main/node_modules/fs doesn't…
Synesso
  • 37,610
  • 35
  • 136
  • 207
0
votes
1 answer

TypeError: this.buf.utf8Write is not a function

I am trying to create a facade for the npm library avsc. When I compile with sbt fastOptJS::webpack and open the .html file, I get TypeError: this.buf.utf8Write is not a function from the line this.buf.utf8Write(s, pos, len); in that file of the js…
Tamriel
  • 1,337
  • 1
  • 9
  • 9
1 2
3