scalacenter / scalajs-bundler

https://scalacenter.github.io/scalajs-bundler
Other
233 stars 101 forks source link

Use fastLinkJS / fullLinkJS #466

Closed ioleo closed 9 months ago

ioleo commented 9 months ago

A simple replacement yields error in my project, not sure why though. Opening this as start of a discussion.

[error] Runtime references to undefined settings: 
[error] 
[error]   client / Compile / fastLinkJS / finallyEmitSourceMaps from server / scalaJSPipeline ((scalajsbundler.sbtplugin.WebScalaJSBundlerPlugin.projectSettings) WebScalaJSBundlerPlugin.scala:48)
[error] 
[error]   client / Compile / fastLinkJS / webpack from server / scalaJSPipeline ((scalajsbundler.sbtplugin.WebScalaJSBundlerPlugin.projectSettings) WebScalaJSBundlerPlugin.scala:48)
[error]

I'd like to switch to fastLinkJS to use the new dynamic module loading, but keep scalajs-web-bundler to package my assets into the server :)

sjrd commented 9 months ago

The Link tasks return a directory, while the Opt tasks return a single file. A direct swap without any other change is unlikely to work.

ioleo commented 9 months ago

It seems switching to Vite is a better alternative. Closing.