Fix wasm target configuration

This commit is contained in:
Alexander Nozik 2023-04-16 13:51:38 +03:00
parent d3432643e8
commit 70c190d7fa
2 changed files with 18 additions and 3 deletions

View File

@ -1,5 +1,5 @@
[versions] [versions]
tools = "0.14.6-kotlin-1.8.20" tools = "0.14.7-kotlin-1.8.20"
kotlin = "1.8.20" kotlin = "1.8.20"
atomicfu = "0.20.0" atomicfu = "0.20.0"
binary-compatibility-validator = "0.13.0" binary-compatibility-validator = "0.13.0"
@ -20,7 +20,7 @@ xmlutil = "0.84.3"
yamlkt = "0.12.0" yamlkt = "0.12.0"
jsBom = "1.0.0-pre.530" jsBom = "1.0.0-pre.530"
junit = "5.9.2" junit = "5.9.2"
compose = "1.3.0" compose = "1.4.0"
logback = "1.4.6" logback = "1.4.6"
[libraries] [libraries]

View File

@ -426,9 +426,24 @@ public open class KScienceMppExtension(project: Project) : KScienceExtension(pro
project.pluginManager.withPlugin("org.jetbrains.kotlin.multiplatform") { project.pluginManager.withPlugin("org.jetbrains.kotlin.multiplatform") {
project.configure<KotlinMultiplatformExtension> { project.configure<KotlinMultiplatformExtension> {
wasm { wasm {
browser() browser {
testTask {
useKarma {
this.webpackConfig.experiments.add("topLevelAwait")
useChromeHeadless()
useConfigDirectory(project.projectDir.resolve("karma.config.d").resolve("wasm"))
}
}
}
block() block()
} }
sourceSets {
getByName("wasmTest") {
dependencies {
implementation(kotlin("test"))
}
}
}
} }
} }
} }