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

alexfacciorusso

03/10/2022, 4:53 PM
Hi all! I am trying to use compose web with a normal kotlin-js project (e.g. non-multiplatform). Gradle, though, keeps failing telling me it "can't find the compose runtime reference"
b

Big Chungus

03/10/2022, 4:57 PM
Compose plugin only works for mpp projects (even if you only target js)
a

alexfacciorusso

03/10/2022, 4:57 PM
I see. So if I want to use compose I need to setup a mpp project with only a js target
b

Big Chungus

03/10/2022, 4:57 PM
Correct
a

alexfacciorusso

03/10/2022, 4:58 PM
do we know if there are plans to support non-mpp projects with compose? Or is there some sort of architectural constraint?
j

jw

03/10/2022, 4:59 PM
This is incorrect. Support for JS plugin was merged. See https://github.com/JetBrains/compose-jb/issues/1821
👍 2
It requires the 1.2.0-alpha01 dev build, though
Using a newer version of the compiler/gradle plugin should work fine with the current stable runtime and other libraries, though
a

alexfacciorusso

03/10/2022, 5:01 PM
Okay that makes completely sense, I'm gonna try that version and I'm sure it's gonna work. Potentially for this one I might just switch to mpp for the client project and then make it single-platform whenever 1.2.0 stable or at least beta will be released
Thank you both @Big Chungus and @jw