dukat
dukat copied to clipboard
Generate externals does not work for test npm dependencies
When declaring a NPM dependency using both Legacy and IR JS compiler types - the following dukat tasks are created : js(Legacy/Ir)GenerateExternals(Integrated). If the NPM dependency is a 'main' source set dependency, and configured to generate externals - externals are indeed generated for that dependency (either implicitly or explicitly). However, if it is a 'test' source set dependency - externals are not generated. example:
val jsTest by getting {
kotlin.srcDir("src/jsTest")
dependsOn(commonTest)
dependencies {
implementation(kotlin("test-js"))
implementation(npm("testcontainers", "6.4.0", generateExternals = true))
}
}
Gradle: 6.7.1 Kotlin: 1.4.21
Running into the same issue when trying to generate external definitions within jsTest
.
val jsTest by getting {
dependencies {
implementation(npm("testcontainers", "8.13.1", generateExternals = true))
}
}