Tschrock / esbuild-plugin-wasm

WASM module loader for esbuild
MIT License
24 stars 5 forks source link

cjs? #1

Open yisar opened 3 years ago

yisar commented 3 years ago
wasm-module:D:\Users\changhaozhao\Desktop\132\node_swc\pkg\node_swc_bg.wasm:41:44: error: Top-level await is currently not supported with the "cjs" output format
    41 │         export const { instance, module } = await loadWasm(wasmModule, imports);
muuvmuuv commented 10 months ago

Having a similar issue:

Building...✘ [ERROR] Top-level await is not available in the configured target environment ("chrome83.0", "ios13.0" + 9 overrides)

    wasm-module:/Users/marvin/Developer/M8FINDER/M8FINDER/node_modules/shiki/dist/onig.wasm:50:44:
      50 │ ... const { instance, module } = await loadWasm(wasmModule, imports);
benma commented 1 month ago

Same issue here. Is there a workaround?