@JsName("Name") does not export function anymore Kotlin 1.5

@JsName(“initRuntime”)
fun initRuntime() {
Runtime()
}

Function initRuntime is not exported in Module. Build with gradle 7.0.2

2 Likes

We have figured out that you should use:

@OptIn(ExperimentalJsExport::class)
@JsExport
@JsName(“initRuntime”)
fun initRuntime(){

}

JsName is not needed if you use JsExport since mangling does not applied to exported functions and properties.