Open joeyrenhuang opened 8 months ago
I encountered the same problem of needing to resolve the wasm file relative to the script url and not the current window.location.
@joeyrenhuang can you rebase to include the latest change (#50)?
I've confirmed this working for my use-case, but it needs to not match @
in getRunningScript()
so we don't prepend the function or code. For examples see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stack
I.e. apply https://github.com/zuckschwerdt/vite-plugin-wasm/commit/eead35b47fcc521b7200df3f7e6ec87b2897dc8f
Encountered a problem when use module federation. fetch wasm failed coz wasm locates different to window.location.origin, so here will get running env before fetch