Prabin Timsina
12/03/2022, 4:29 PMjsBrowserDevelopmentRun --continuous
. (I also have ktor server running alongside)
build.gradle
plugins {
id 'org.jetbrains.kotlin.multiplatform' version '1.7.21'
id 'application'
id 'org.jetbrains.kotlin.plugin.serialization' version '1.7.21'
}
def ktorVersion = "2.1.3"
group = 'me.developer'
version = '1.0-SNAPSHOT'
repositories {
jcenter()
mavenCentral()
maven { url '<https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven>' }
}
kotlin {
jvm {
compilations.all {
kotlinOptions.jvmTarget = '1.8'
}
withJava()
testRuns["test"].executionTask.configure {
useJUnitPlatform()
}
}
js() {
binaries.executable()
browser {
commonWebpackConfig {
cssSupport.enabled = true
devServer?.port = 8080
}
}
}
// dependencies {...}
}
application {
mainClassName = 'me.developer.application.ServerKt'
applicationDefaultJvmArgs = ["-Dio.ktor.development=true"]
}
tasks.named('jvmProcessResources') {
def jsBrowserDistribution = tasks.named('jsBrowserDistribution')
from(jsBrowserDistribution)
}
tasks.named('run') {
dependsOn(tasks.named('jvmJar'))
classpath(tasks.named('jvmJar'))
}
Leon
12/04/2022, 2:24 AMRobert Jaros
12/04/2022, 10:36 AMPrabin Timsina
12/04/2022, 4:26 PMjs() {
binaries.executable()
browser {
commonWebpackConfig {
sourceMaps = false // <-----------------
cssSupport.enabled = true
devServer?.port = 8080
}
}
}
Moritz Hofmeister
12/05/2022, 10:08 AMRobert Jaros
12/05/2022, 10:09 AMErik
06/18/2023, 11:46 AM