Closed Lunarequest closed 1 year ago
Ah, I assumed esbuild would give me the full path to the wasm file, but it's just giving the path relative to the output directory. I've pushed an update to have the file fetched from the script's location rather than the page since that seems to make more sense.
If you need more control over the location, you can also use esbuild's publicPath
option to specify a prefix.
can confirm it works!
It seems the current way the wasm binary loads is it finds the current page url and queries from one domain up, however in my case I load everything from a
/static/js
folder and this auto detection instead uses the current page url which breaks stuff. A param to specify to query at/static/js
would be very useful, would this be possible?