but each one results in a runtime uncaught WebAssembly.Exception
Brendan Weinstein
12/29/2024, 8:35 PM
Ah! Only ES modules are supported per the documentation table here
Copy code
Supports ES modules only. There is no analog of the @JsNonModule annotation. Provides its exports as properties on the default object. Allows exporting package-level functions only.
e
ephemient
12/29/2024, 8:37 PM
you don't need
@JsNonModule
, I haven't used mapbox but I'd expect
Copy code
@JsModule("mapbox-gl")
external var accessToken: JsString
as the docs make it look like a direct export
b
Brendan Weinstein
12/29/2024, 8:39 PM
will give that a try, but I am wondering if the compiler will be thrown off by the function at the top of the UMD module
Brendan Weinstein
12/29/2024, 8:46 PM
ok, I haven't gotten to your suggestion, but found an alternate means of gettings things working. I've included the script tags for mapbox in my
index.html
and then defined the below for interop
Copy code
external object mapboxgl {
var accessToken: JsString
}