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 PM
I suppose I should pack my JS content into a jar with something like this:
Copy code
tasks.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