Hello, I'm trying to add ktor js client as depende...
# javascript
c
Hello, I'm trying to add ktor js client as dependency into a kmp project generated with wizard.
Copy code
sourceSets {
        val desktopMain by getting
        
        androidMain.dependencies {
            implementation(libs.compose.ui.tooling.preview)
            implementation(libs.androidx.activity.compose)
            implementation(libs.ktor.client.okhttp)
        }
        commonMain.dependencies {
            implementation(compose.runtime)
            implementation(compose.foundation)
            implementation(compose.material)
            implementation(compose.ui)
            implementation(compose.components.resources)
            implementation(compose.components.uiToolingPreview)
            implementation(libs.ktor.client.core)
        }
        desktopMain.dependencies {
            implementation(compose.desktop.currentOs)
            implementation(libs.ktor.client.java)
        }
        iosMain.dependencies {
            implementation(libs.ktor.client.darwin)
        }
    }
How to add ktor js client to js sourceset?
a
Copy code
jsMain.dependencies {
  implementation(libs.ktor.client.js) // which should be defined inside your gradle/libs.versions.toml
  // Like this: ktor-client-js = { module = "io.ktor:ktor-client-js", version.ref = "ktor" }
}
­čĹŹ 1
c
Thanks