l

    Logan Knight

    2 years ago
    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.
    Robert Jaros

    Robert Jaros

    2 years ago
    It looks like https://youtrack.jetbrains.com/issue/KT-32273, but it should work fine with 1.4.0
    l

    Logan Knight

    2 years ago
    I see, thanks for pointing that out.
    It doesn't FWIW
    plugins {
        kotlin("multiplatform") version "1.4.0" apply false
        kotlin("plugin.serialization") version "1.4.0" apply false
    }
    Robert Jaros

    Robert Jaros

    2 years ago
    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

    2 years ago
    That works. Thank you!