ian.shaun.thomas
10/19/2023, 5:27 PMkotlin {
js { browser() }
js ("targetA") {
browser()
binaries.executable()
}
js ("targetB") {
browser()
binaries.executable()
}
sourceSets {
val targetAMain by getting {
dependsOn(jsMain)
}
val targetBMain by getting {
dependsOn(jsMain)
}
}
}
The issue I was having is that when attempting to apply compose you get a warning about multiple IR targets and to specify the targets with compose.web.targets()
and I unfortunately could not find any examples of how to manually specify the targets. It ended up being simple but if anyone has an easier way to do this I'm happy to adopt it.
compose {
web.targets(
*kotlin.targets
.asMap
.values
.filterIsInstance(KotlinJsIrTarget::class.java)
.toTypedArray()
)
}