https://kotlinlang.org logo
#compose-web
Title
# compose-web
p

PHondogo

11/12/2023, 11:03 PM
As i can see there are js-html and wasm-canvas targets. Is it possible to configure js-canvas? If yes then how and what dependencies should i use?
a

Arkadii Ivanov

11/12/2023, 11:48 PM
As of Kotlin 1.9.10 and Multiplatform Compose 1.5.1, the following works (from the top of my head).
Copy code
plugins {
    id("kotlin-multiplatform")
    id("org.jetbrains.compose")
}

kotlin {
    js {
        browser()
        binaries.executable()
    }
}

kotlin {
    sourceSets {
        jsMain {
            dependencies {
                implementation(compose.runtime)
                implementation(compose.foundation)
                implementation(compose.material)
            }
        }
    }
}

compose.experimental {
    web.application {}
}
p

PHondogo

11/13/2023, 2:27 PM
Thanks, friends!
K 1
5 Views