"0.0.0+1-d083e6df-SNAPSHOT"... the old one (
0.20.0) works fine though:
[error] (update) sbt.librarymanagement.ResolveException: Error downloading ch.epfl.scala:sbt-scalajs-bundler;sbtVersion=1.0;scalaVersion=2.12:0.0.0+1-d083e6df-SNAPSHOT [error] Not found [error] Not found [error] not found: https://repo1.maven.org/maven2/ch/epfl/scala/sbt-scalajs-bundler_2.12_1.0/0.0.0+1-d083e6df-SNAPSHOT/sbt-scalajs-bundler-0.0.0+1-d083e6df-SNAPSHOT.pom [error] not found: /Users/ashkan/.ivy2/local/ch.epfl.scala/sbt-scalajs-bundler/scala_2.12/sbt_1.0/0.0.0+1-d083e6df-SNAPSHOT/ivys/ivy.xml [error] not found: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/ch.epfl.scala/sbt-scalajs-bundler/scala_2.12/sbt_1.0/0.0.0+1-d083e6df-SNAPSHOT/ivys/ivy.xml [error] not found: https://repo.typesafe.com/typesafe/ivy-releases/ch.epfl.scala/sbt-scalajs-bundler/scala_2.12/sbt_1.0/0.0.0+1-d083e6df-SNAPSHOT/ivys/ivy.xml [warn] Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? (default: r)
2.12) while I'm using
Hi, love this lib! Trying to implement code splitting using Webpack's "magic comments" but are all comments getting stripped away by scalajs optimization before webpack sees them?
thanks @cquiroz:matrix.org , so then the only option I presume is to separate "modules" by different sbt subprojects - each one running scalajs bundler separately?
If that is the only workaround, how then do I reference the individually bundled so that my "main" subproject is able to progressively load them?
curious, why does scalajsbundler output everything into just a "main" folder? I'm working with Tauri, and it expects code layout something along the lines of:
./dist <- all bundled js/assets in here ./node_modules ./src-tauri ./package.json
Is there a way or interest in supporting configuration for a dist folder separate from package.json? A flat layout unfortunately leads to buggy behavior so I am generating this layout manually with a script after running scalajs bundler
cd client/target/scala-2.13/scalajs-bundler/main/ && \ mkdir --parents ./build && rsync --archive --human-readable --progress --remove-source-files \ --exclude=build \ --exclude=node_modules \ --exclude=package*json \ --exclude=webpack \ * ./build/
addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.20.0")
(ThisBuild / baseDirectory).value / "target" / "scala-2.13" / "scalajs-bundler" / "main" / "node_modules" / "custom-protos"
npmInstallDependenciestask returns the
node_modulesdirectory, I need the directory as an input for a
Settingcan't depend on a
Task, hence, I ended up writing this:
(npmUpdate / crossTarget).value / "scalajs-bundler" / "main" / "node_modules" / "custom-protos"
using the latest release 0.21.0-RC1, I try to use
webpackBundlingMode in fastOptJS set to
But then only
*-fastopt-library.js is emitted and not
I can work around this by disabling
LibraryOnly, but how can I enable it while also emitting those others as it worked in 0.20.0?
Hi there, using the bundler for the first time this week and ran against some warnings when sharing a module between a Play server and a scala.js client. This shared module has a dependency (play-json-derived-codecs), here is what I see :
[warn] WARNING in ./client-fastopt.js [warn] Module Warning (from ./node_modules/source-map-loader/dist/cjs.js): [warn] Failed to parse source map from '/home/runner/work/play-json-derived-codecs/play-json-derived-codecs/library/src/main/scala/julienrf/json/derived/DerivedOWrites.scala' file: Error: ENOENT: no such file or directory, open '/home/runner/work/play-json-derived-codecs/play-json-derived-codecs/library/src/main/scala/julienrf/json/derived/DerivedOWrites.scala'
Is there anything obvious that I'm missing in my build.sbt? (I can try to share a minimal version to reproduce). Thanks