scalacenter / scalajs-bundler

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

BundlingMode.LibraryAndApplication() does not work with sourcemap to false #435

Open mathieuleclaire opened 1 year ago

mathieuleclaire commented 1 year ago

I guess it is a bug. I tried to build an application with multiple entry points as described here: https://scalacenter.github.io/scalajs-bundler/cookbook.html#several-entry-points. In my source I defined a very dummy code like this:

@JSExportTopLevel(name = "openmole_site")
@JSExportAll
object SiteJS {

def foo(): Unit = {
println("FOO")
}
}

with the webpackBundlingMode := BundlingMode.LibraryAndApplication() set in build.sbt. When executing in a browser console, I was only able to access to openmole_site object and not the the foo one. Turning the sourcemap to true fixed this issue; but it shouldn't be correlated, right ?