WebAssembly.instantiateStreaming(): unexpected section #2873
Unanswered
ShayRubach
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello. I have my Rust code compiled to wasm and successfully called from a JS file. I followed the official tutorial.
Now, when shipping the same code to my production project, that includes bundling everything via webpack5, I get the following error:
Uncaught (in promise) CompileError: WebAssembly.instantiateStreaming(): unexpected section <<unknown>> @+17862 Promise.then (async) __webpack_require__.a @ (index):51572 Object.defineProperty.value @ (index):106 __webpack_require__ @ (index):51493 (anonymous) @ (index):51678 (anonymous) @ (index):51680
I have tried to
wasm-pack build
bothweb
andbundle
targets (and instantiate Wasm manually when needed) with no success.I've also read a few github discussions about somewhat similar issues people had but with no success of solving mine.
When I debug the wasm API call inside the browser, it looks as if the failure happens during webpack. Is there any known issue regarding using webpack 5 and wasm? Or any other way I can test/work around it?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions