-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: No transformers found for [...] wasm #6284
Comments
They just changed the scope hoisting implementation to SWC to become faster, see #6230 And it basically ruined the production readyness. Try downgrading to |
This has nothing to do with the switch to SWC.
That is the proposed syntax for https://github.com/WebAssembly/esm-integration/tree/master/proposals/esm-integration. The problem is that wasm imports are essentially equivalent to importing a JS file that has a top level await statement. And we also don't support that yet. (Parcel 1's implementation of that doesn't really work once you start importing from a module that imports wasm.) What you can do for now is import wasmURL from "url:./add.wasm";
const wasmModule = WebAssembly.instantiateStreaming(fetch(wasmURL)).then(obj => obj.instance.exports);
function something(){
console.log((await wasmModule).add(1,2));
} (or |
Thanks!
Would it be worth updating https://parceljs.org/webAssembly.html to reflect this or is the goal to support the documented syntax in the near future? |
That page is for Parcel 1 anyway. The Parcel 2 docs https://v2.parceljs.org don't mention Webassembly at all. It would be great to support this, but there are other priorities right now... |
Directly from your link:
That line should probably be removed until v2 supports WASM. |
Good point: parcel-bundler/website#861 |
Closing in favor of #1325 In the meantime, you use |
🐛 bug report
WASM support does not work.
https://parceljs.org/webAssembly.html
🎛 Configuration (.babelrc, package.json, cli command)
No config.
🤔 Expected Behavior
The example from https://parceljs.org/webAssembly.html works out of the box.
😯 Current Behavior
💁 Possible Solution
Not sure.
🔦 Context
Trying to check if Parcel WASM support is production-ready.
💻 Code Sample
See https://github.com/lgarron/parcel-issue-6284
🌍 Your Environment
2.0.0-nightly.660+177f8eec
v16.0.0
7.11.2
The text was updated successfully, but these errors were encountered: