You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I run fastOptJS::webpack, then open the html page (as file://) in my browser, and see the two print statements in the console:
yay
HelloWorld$@1
But referencing HelloWorld gives:
Uncaught ReferenceError: HelloWorld is not defined
at <anonymous>:1:1
It seems like the object is getting renamed or obfuscated by webpack in some way?
If I don't enable ScalaJSBundlerPlugin, do regular fastOptJS, and point my index.html at that file, I get a top-level HelloWorld JS object as expected.
Sorry if I'm missing something obvious.
The text was updated successfully, but these errors were encountered:
Maybe I'm missing something obvious, but I can't get top-level exports to work under scalajs-bundler.
(Full repro here)
I have one source file,
HelloWorld.scala
:build.sbt:
project/plugins.sbt:
project/build.properties:
index.html:
I run
fastOptJS::webpack
, then open the html page (asfile://
) in my browser, and see the two print statements in the console:But referencing
HelloWorld
gives:It seems like the object is getting renamed or obfuscated by webpack in some way?
If I don't enable
ScalaJSBundlerPlugin
, do regularfastOptJS
, and point myindex.html
at that file, I get a top-levelHelloWorld
JS object as expected.Sorry if I'm missing something obvious.
The text was updated successfully, but these errors were encountered: