https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
l

Logan Knight

09/08/2020, 7:21 PM
Hey all, new to Kotlin, come from a js background. Playing with https://github.com/Kotlin/kotlin-full-stack-application-demo, HMR fails. It looks like
PROJECT_ROOT/build/js/packages/kotlin-full-stack-application-demo-client/kotlin/kotlin-full-stack-application-demo-client.js
gets deleted during
compileKotlinJs
task which causes HMR to fail out with
Error: ENOENT: no such file or directory, open
. I'm trying to wrap my head around the config and it seems I need to have the task ``compileKotlinJs`` not clear the folder and just overwrite the content, but I'm not quite sure how, or if that's the correct solution.
r

Robert Jaros

09/08/2020, 7:52 PM
It looks like https://youtrack.jetbrains.com/issue/KT-32273, but it should work fine with 1.4.0
l

Logan Knight

09/08/2020, 8:02 PM
I see, thanks for pointing that out.
It doesn't FWIW
Copy code
plugins {
    kotlin("multiplatform") version "1.4.0" apply false
    kotlin("plugin.serialization") version "1.4.0" apply false
}
r

Robert Jaros

09/08/2020, 8:05 PM
You can try with legacy compiler backend
the repo is set for IR, which is not stable
try setting
kotlin.js.compiler=legacy
in
gradle.properties
l

Logan Knight

09/08/2020, 8:12 PM
That works. Thank you!
2 Views