Worker message @JsExport example
This commit is contained in:
48
build.gradle.kts
Normal file
48
build.gradle.kts
Normal file
@@ -0,0 +1,48 @@
|
||||
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"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user