I’ve got an issue with dependency management when compiling Kotlin to JS as a npm package. How can I point dirs with dependencies that should be required in generated JS?
In gradle.build
:
sourceSets {
commonMain {
dependencies {
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:0.13.0'
implementation 'com.soywiz.korlibs.krypto:krypto:1.9.0'
implementation 'com.ionspin.kotlin:bignum:0.1.4-SNAPSHOT'
implementation 'com.benasher44:uuid:0.0.5'
}
}
}
generates JS function called with listed arguments
(module.exports,
require('kotlin'),
require('kotlinx-serialization-kotlinx-serialization-runtime'),
require('krypto-root-krypto'),
require('bignum'),
require('uuid'));