https://kotlinlang.org logo
#javascript
Title
# javascript
k

Kevin Burgmann

03/05/2024, 9:07 AM
For Kotlin exports to JS (with
@JsExport
), is there any possibility to set the module name, which by default is
packageA.packageB.packageC.packackgeD.theClassName
? For example, the code using a Kotlin npm module right now has to look like the screenshot attached, is there any option to maybe drop the whole long package name?
e

Edoardo Luppi

03/05/2024, 10:49 AM
Nope, I think there is a YouTrack issue somewhere for that. If compiling to ESM is possible, that will make your exported declarations top level. Although namespacing is indeed useful sometimes.
2 Views