Testing it now. I can confirm the first part of th...
# javascript
h
Testing it now. I can confirm the first part of this works (when I change
File file ->
into simply
file ->
). When this task is performed, I find the kotlin.js file in the lib directory, as expected. But I have a hard time finding out how to make my sourceSet
jsMain
dependOn this. The `dependsOn`clause is no good here ("Could not find method dependsOn() for arguments [task ':linkJs'] on target js (js) of type org.jetbrains.kotlin.gradle.plugin.mpp.KotlinOnlyTarget."). Will examine further tomorrow.
t
I just put the task in the outer part of the
build.gradle
, below the
kotlin
block
g
You could also use the kotlin-dce plugin, it will give you a much smaller version of the kotlin lib and your app by eliminating dead code. I am using it now even in development. I haven't tested it with other kotlin libraries like kotlin-react yet, but I assume it separates them out into individual js files like it does with the kotlin stdlib.