Current Status of WASM support #9656
-
I know Parcel v1 supported importing .wasm assets. For V2 I couldn't find anything in the docs about it. There are some issues that talked about it but it's unclear whether this exists as of now. There a note in the Roadmap and also this open issue. So my question is: What is the current state WASM support in Parcel V2? Is there any support WASM at all currently? Could wasm be used by simply fetching and loading it with normal WASM APIs? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Yes, this would work: let wasm = fetch(new URL("./simple.wasm", import.meta.url))
WebAssembly.instantiateStreaming(wasm) That Wasm file can be treated like any other asset: https://parceljs.org/languages/javascript/#url-dependencies
You currently cannot ESM- |
Beta Was this translation helpful? Give feedback.
Yes, this would work:
That Wasm file can be treated like any other asset: https://parceljs.org/languages/javascript/#url-dependencies
You currently cannot ESM-
import
Wasm files, that would also be blocked on TLA support in Parcel: #4028But this shouldn't prevent you from using Wasm