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

Kiryushin Andrey

01/04/2022, 3:23 PM
Hi! I've tried to use Compose for web in a pure Kotlin JS module, and it fails to compile with a cryptic assertion error within the Kotlin JS compiler backend. Is Compose expected to work with Kotlin JS Gradle plugin at all? Looking through all the samples, I now see that all of them use multiplatform gradle plugin, even if they have JS as the only target... Here is the repro - https://github.com/Kiryushin-Andrey/compose-web-js-bug-repro, it is basically a copy of https://github.com/JetBrains/compose-jb/tree/master/templates/web-template with
multiplatform
replaced with
js
in gradle scripts.
r

Rohan Maity

01/04/2022, 3:28 PM
Compose for web works with
multiplatform
plugin only. Compose is multuplatform artifact/library. So you would require
multiplatform
gradle plugin instead of
js
plugin
5 Views