Марк Вавилов
07/08/2021, 4:05 PMBig Chungus
07/08/2021, 4:08 PMkotlin.sourceSets.named("jsMain") {
dependencies {
implementation(npm("package-name", "version"))
}
}
Then you can either use ./gradlew generateExternals
and pray that dukat works or write external declarations yourself.Big Chungus
07/08/2021, 4:09 PMBig Chungus
07/08/2021, 4:12 PMfile:path/to/that/module
version instead. I recommend generating absolute path to that module in gradle instead of trying to work out relative path from package.json that kotlin plugin generates
kotlin.sourceSets.named("jsMain") {
dependencies {
val pathToLocalNpmModule = rootProject.projectDir.resolve("js/my-module").canonicalPath
implementation(npm("my-module", "file:$pathToLocalNpmModule"))
}
}
Big Chungus
07/08/2021, 4:19 PMМарк Вавилов
07/08/2021, 4:26 PMBig Chungus
07/08/2021, 4:27 PMBig Chungus
07/08/2021, 4:30 PMBig Chungus
07/08/2021, 4:32 PMМарк Вавилов
07/09/2021, 3:43 PMBig Chungus
07/09/2021, 3:44 PMBig Chungus
07/09/2021, 3:46 PMМарк Вавилов
07/09/2021, 3:47 PMBig Chungus
07/09/2021, 3:48 PMEdoardo Luppi
08/21/2023, 10:24 PM