async/await not support warning with wasm
Unanswered
Chum salmon posted this in #help-forum
Chum salmonOP
The generated code contains 'async/await' because this module is using "asyncWebAssembly".
However, your target environment does not appear to support 'async/await'.
As a result, the code may not run as expected or may cause runtime errors.I got error like above when working with wasm.
How can I fix this warning?
16 Replies
Chum salmonOP
import library which use wasm in it
@gin are u tryng to import wasm or what?
Chum salmonOP
Yes
@gin are u tryng to import wasm or what?
Chum salmonOP
And I am using App router.
@Chum salmon And I am using App router.
i think u can have the importing in a promise
and only use wasm when promise resolves
show me your code
or u could set async wasm in custom webpack
@gin show me your code
Chum salmonOP
Only import type as sync
remove await and use promise
@gin remove await and use promise
Chum salmonOP
How?
import("your lib").then
and fromText in callback
Chum salmonOP
Okay, let me try