github-actions[bot] on gh-pages
Deploying to gh-pages from @ b… (compare)
julienrf on main
Rename master to main (compare)
julienrf on master
julienrf on main
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