Wasm not worked in edge
See original GitHub issueBug report
What is the current behavior? wasm is not usable on edge
If the current behavior is a bug, please provide the steps to reproduce.
- create a wasm module and import it
import("my_wasm_module").then(m => m.greet()) - open edge (not chromium kernel) it would complains about
TypeError: Response expected - open edge (chromium kernel): everything works
What is the expected behavior? the wasm would generate code like this
var req = fetch(__webpack_require__.p + "" + {"b819":"b6527e0fa9c3d95b89bc"}[wasmModuleId] + ".module.wasm");
promise = WebAssembly.instantiateStreaming(req, importObject);
According to docs, the first argument should be “A Response object or a promise that will fulfill with one”, it should be happy with Promise<Response> but actually not on edge.
And I have tried in console
fetch("/my_wasm_module.wasm")
.then(r => WebAssembly.instantiateStreaming(r, importObject))
.then(x => console.log(x))
and works.
Other relevant information: webpack version: “4.42.0” Node.js version: v12.16.1 Operating System: Windows 10 18362.720 Additional tools: Edge (bundled with windows, not chromium kernel)
I do know it is bug in Edge, but I think we should have workaround in webpack for a wide used browser if possible.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
This browser does not support WebAssembly - Edge
1] Enable WebAssembly in Edge · Open the Microsoft Edge browser. · Press the Enter key. · Type WebAssemby in the Search bar...
Read more >Edge 97.0.1072.69 : This browser does not support ...
Hello, I can't figure out why in my version of edge (stable 97.0.1072.69), the absolutely cannot access webassembly sites like mudblazor.com ...
Read more >Microsoft Edge - WebAssembly is not defined #137704
It looks like in your case Edge doesn't support WebAssembly. WebAssembly is a web technology that is vital for vscode.dev/gh.dev and without it ......
Read more >How to enable WebAssembly in Microsoft Edge
Option 1: Use Firefox or Chrome. Firefox and Chrome always support WebAssembly by default, so using either of these browsers should work fine ......
Read more >Browser Compatibility of WebAssembly on Microsoft Edge 93
WebAssembly is · Fully Supported on · Microsoft Edge 93. To put it simply, if your website or web page is using WebAssembly,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

We had this issue and finally tracked it down. The promise object was being pollyfilled and that was what was causing the problem.
We are using babel and we were manually importing
regenerator-runtime/runtimeandcore-js/stablein our entrypoint and this was the source of the problem.We switched to using
@babel/plugin-transform-runtimeand that was the solution.Closing due to inactivity. Please test with latest version and feel free to reopen if still regressions. Thanks!