fullOptUs: scalacenter/scalajs-bundler#338. I don't have this problem with 0.20.0 and webpack4.
"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?