https://kotlinlang.org logo
j

jamshedalamqaderi

07/31/2023, 10:32 AM
Could someone tell me why in production distribution i’m not able to get the
uninstantiated.mjs
? Or let me know how i could deploy a production bundle successfully!
I’ve solve this issue by creating a copy task
Copy code
tasks.register<Copy>("copyMjsFile") {
    mustRunAfter("wasmBrowserDistribution")
    from("$buildDir/compileSync/wasm/main/productionExecutable/kotlin/jamshedalamqaderi-portfolio.uninstantiated.mjs")
    into("$buildDir/dist/wasm/productionExecutable")
}

tasks.register("bundlePortfolio") {
    dependsOn("wasmBrowserDistribution", "copyMjsFile")
}
And execute the task by this
./gradlew :web:bundlePortfolio
4 Views