Pavel Pristalov
01/05/2024, 1:42 PMandroidApp, iosApp, shared, backend and web modules. My ktor backend server returns index.html:
routing {
    staticResources("/", "static") {
        default("index.html")
    }...
Everything works fine. But how can I use index.html, other static content and generated web.js file from my web module?
More details are in the thread.Pavel Pristalov
01/05/2024, 1:44 PMtasks.getByName<Jar>("jvmJar") {
    val taskName = if (project.hasProperty("isProduction")
        || project.gradle.startParameter.taskNames.contains("installDist")
    ) {
        "jsBrowserProductionWebpack"
    } else {
        "jsBrowserDevelopmentWebpack"
    }
    val webpackTask = tasks.getByName<KotlinWebpack>(taskName)
    dependsOn(webpackTask) // make sure JS gets compiled first
    from(File(webpackTask.destinationDirectory, webpackTask.outputFileName)) // bring output file along into the JAR
}
but what’s the next step? Can anyone share the code how share content between web and backend modules?