I think fixing <KT-71294> may help in this case as...
# webassembly
b
I think fixing KT-71294 may help in this case as well.
i
@Todd Does your wasm file is near
mjs
file? So if we will use
new URL("project.wasm", import.meta.url).href
does it help in your case?
import.meta.url
means url of current
mjs
script So if you have •
project.mjs
project.wasm
it should be resolved correctly, am I right?
t
I'm not sure, but I can test it out. Currently
wasmJsBrowserDistribution
is just generating a js file though. How do I generate a mjs file instead? This is my current configuration
Copy code
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalWasmDsl::class)
    wasmJs {
        browser { }
        useEsModules()
        binaries.executable()
    }
Okay I think I figured it out. I was looking at the wrong distribution directory
i
Yes, you are right,
wasmJsBrowserDistribution
produces
js
file, because it is
webpack
output, I wrote about compiler output. Anyway, I guess fix of issue above should help with your use case
👍 1