Hi, I want know how to add dependencies to targert...
# webassembly
e
Hi, I want know how to add dependencies to targert only wasm platform in the build.gradle.kts gradle config file; in composeApp module in Kotlin Multplatfom project. I use Coil in my project to load images from URL; it works on all other platforms execept wasmJs
a
Copy code
kotlin {
    sourceSets {
        wasmJsMain.dependencies {
            implementation("YOUR_DEPENDENCY") // it will add the dependency only for Wasm main (for tests you need to use wasmJsTest sourceSet)
        }
    }
}
Btw I used Kamel for the same purposes, because it has Wasm as a target
m
Which version of Coil? I thought that since version 3 it also supports wasmJs. See: https://mvnrepository.com/artifact/io.coil-kt.coil3/coil-core-wasm-js/3.0.1