This may have been brought up before but is the JS...
# compose-web
f
This may have been brought up before but is the JS target supported for compose multiplatform web? I have just started researching KMM and I do not see any examples or mention of the JS target in any of the docs. WASM target is a no go since the GC feature is not currently supported on some current platforms and even when it supported on all modern platforms, there are legacy platforms to worry about.
2
p
I think it is worth opening an issue for this problem. However, in the official examples still a few hasn't been migrated to only wasm. Eg: https://github.com/JetBrains/compose-multiplatform/tree/master/examples%2Fchat It uses the old
shared
module structure. If you want an example using the
composeApp
project structure, check here: https://github.com/pablichjenkov/macao-marketplace/blob/dev/composeApp%2Fbuild.gradle.kts#L49 Adding the target is basically specifying the
js(IR)
block and indicating the build tool you are fine with experimental compose-js. See this line: https://github.com/pablichjenkov/macao-marketplace/blob/dev/composeApp%2Fbuild.gradle.kts#L252 And this one: https://github.com/pablichjenkov/macao-marketplace/blob/dev/gradle.properties#L10 That's all you need!
o
See this thread for info on using Compose Web on the JS target instead of Wasm. I should create a bot for this answer. 😉
🤖 1