import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackOutput.Target.VAR plugins { kotlin("multiplatform") version "1.4.0" } group = "com.banktrade" version = "1.0-SNAPSHOT" repositories { mavenCentral() } kotlin { js(IR) { useCommonJs() binaries.executable() browser { webpackTask { } distribution { directory = File("$projectDir/web/") } } } js("jsWorker", IR) { //useCommonJs() binaries.executable() browser { webpackTask { output.libraryTarget = VAR output.library = "worker" } distribution { directory = File("$projectDir/web/js/worker") } } } sourceSets { val commonMain by getting val commonTest by getting { dependencies { implementation(kotlin("test-common")) implementation(kotlin("test-annotations-common")) } } } }