#async/await not support warning with wasm

17 messages · Page 1 of 1 (latest)

pine gust
#
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?

little stratusBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

waxen karma
pine gust
#

import library which use wasm in it

pine gust
pine gust
waxen karma
#

and only use wasm when promise resolves

#

show me your code

#

or u could set async wasm in custom webpack

pine gust
#

Only import type as sync

waxen karma
#

remove await and use promise

pine gust
waxen karma
#

import("your lib").then

#

and fromText in callback