36 lines
927 B
Plaintext
36 lines
927 B
Plaintext
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
|
|
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
|
|
|
|
plugins {
|
|
alias(libs.plugins.kotlinMultiplatform)
|
|
|
|
}
|
|
|
|
kotlin {
|
|
jvm()
|
|
|
|
@OptIn(ExperimentalWasmDsl::class)
|
|
wasmJs {
|
|
browser {
|
|
val rootDirPath = project.rootDir.path
|
|
val projectDirPath = project.projectDir.path
|
|
commonWebpackConfig {
|
|
devServer = (devServer ?: KotlinWebpackConfig.DevServer()).apply {
|
|
static = (static ?: mutableListOf()).apply {
|
|
// Serve sources to debug inside browser
|
|
add(rootDirPath)
|
|
add(projectDirPath)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
commonMain.dependencies {
|
|
// put your Multiplatform dependencies here
|
|
}
|
|
}
|
|
}
|
|
|