You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
emscripten has an instantiateWasm property, where you get the imports and must call the callback with the module, which wont work in vite, because the __vite-wasm-helper returns only Webassembly.Exports
instantiateWasm: (imports,cb)=>{FFprobewasm(importsasany).then((exports)=>{console.log(exports)// compilation worked, and the exports are loggedcb(module)// <- but the callback expects a Webassembly.Module, // but the helper only returns Webassembly.Exports})return{}}
Clear and concise description of the problem
emscripten has an
instantiateWasm
property, where you get the imports and must call the callback with the module, which wont work in vite, because the__vite-wasm-helper
returns onlyWebassembly.Exports
Suggested solution
https://github.com/vitejs/vite/blob/main/packages/vite/src/node/plugins/wasm.ts#L40
this should only return result, if needed, the user can call the properties by himself, but in the current way there is no way to access the module
Alternative
an alternative is to compile the wasm myself, because then I get access to the Module
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: