Hi, i got an issue, try to implement web compose t...
# compose-web
ł
Hi, i got an issue, try to implement web compose to my kmm project: Unresolved reference: wasmJs
Copy code
plugins {
    id("app.module")
    alias(libs.plugins.composeJetbrains) // version 1.6.0-rc01
}

id("app.module) -> 
override fun apply(target: Project) {
 with(target) {

  val libs = target.the<LibrariesForLibs>()

  with(pluginManager) {
   apply(libs.plugins.kotlin.multiplatform.get().pluginId)
   apply(libs.plugins.android.library.get().pluginId)
   apply(libs.plugins.app.detekt.get().pluginId)
   apply(libs.plugins.app.ksp.inject.get().pluginId)
}
a
It could be, that you use 1.9.0 version. In this case, just try to use
wasm
instead of
wasmJs
. We've changed API somewhere near those versions.
ł
1.9.21 exactly
a
Did the replacement help?
ł
Zrzut ekranu 2024-02-14 o 11.50.36.png
;/
Zrzut ekranu 2024-02-14 o 11.54.54.png
a
Weird. But with
wasmJs
the compilation works fine, the only issue is IDEA concerns, right?
ł
nope, gradle sync is failing
Zrzut ekranu 2024-02-14 o 12.01.05.png
AGP 8.2.0
a
@Ilya Goncharov [JB], what it could be?
i
Do you have sample project?
ł
This is multi-module app and i wanted to implement web-compose as a feature. There is my libs.versions.toml:
i've downgraded jetbrains compose cuz of colection issue in 1.6.0-rc01
i
I tried
jetsnack
sample with upgraded versions (https://github.com/Kotlin/kotlin-wasm-examples/tree/main/compose-jetsnack) And
wasmJs
works pretty fine with upgraded versions. So I can say that you have to use
wasmJs
instead of
wasm
when you use Kotlin 1.9.21, you can still use
wasm
in 1.9.21, but it is deprecates. Before 1.9.21 you have to use only
wasm
(there is no reference
wasmJs
in previous versions)