How can I access `kotlin-react-redux`'s functions?...
# javascript
j
How can I access `kotlin-react-redux`'s functions? Each
moduleKind
configuration in Gradle gives me a different error: -
default moduleKind
or `moduleKind="umd"`: " When accessing module declarations from UMD, they must be marked by both @JsModule and @JsNonModule " - `moduleKind="plain"`: " Can't access function 'createStore' marked with @JsModule annotation from non-modular project " -
moduleKind="commonjs"
compiles the
main
sources fine, but then I get the following for tests:
When accessing module declarations from UMD, they must be marked by both @JsModule and @JsNonModule
Did I miss something? Am I required to define a
moduleKind
separately for tests? Where is it then?
I guess laying that down in text led me to the correct config:
Copy code
tasks {
    compileKotlinJs {
        kotlinOptions.metaInfo = true
        kotlinOptions.sourceMap = true
        kotlinOptions.moduleKind = "commonjs"
        kotlinOptions.main = "call"
    }
    compileTestKotlinJs {
        kotlinOptions.moduleKind = "commonjs"
    }
}
a
👍