You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: If your browser lacks support for top-level await, you'd need to wrap that code in an async-function.
IIUC, Node has provided "experimental support" for ES6 modules for some years, so the parser shouldn't choke on the export statement.
Unless I'm missing something, it seems like it'd be a simple change (and this has been requested a few times, in one form or another). Thanks for considering it, either way.
The text was updated successfully, but these errors were encountered:
WABT can be useful in the browser, but there's no way to import it there.
Adding the following line to the very end of the
wabt.js
file (available from the CDNs) makes it importable (as a standard ES6 module):The API can then be imported using any name you like (
Wabt
in this example):Note: If your browser lacks support for top-level await, you'd need to wrap that code in an async-function.
IIUC, Node has provided "experimental support" for ES6 modules for some years, so the parser shouldn't choke on the export statement.
Unless I'm missing something, it seems like it'd be a simple change (and this has been requested a few times, in one form or another). Thanks for considering it, either way.
The text was updated successfully, but these errors were encountered: