Please consider a Scala.js library with a native dependency implemented as pure JavaScript CommonJS module.
The library includes a facade for the JavaScript dependency. As expected, the facade includes a lot of code like:
@JSImport("com", "Foo") @js.native
class Foo extends js.Object { ... }
Unfortunately, the ScalaJS-Bundler bundles Foo in a way that hides it from the global scope. The obvious fix involves adding the @JSExport annotation to the other two, but that results in a compiler error.
Why isn't js.native compatible with JSExport? What would it take to add support for @JSExport on facades?
Is any work-around available now?