vite-plugin-wasm
vite-plugin-wasm copied to clipboard
can we add an option control whether generated code using top-level-await?
Hello, thank you for your great work first. Since top-level-await has not been well supported now. and the using vite-plugin-top-level-await to handle compatibility problem may cause async contamination which may introduce hard-to-debug unwanted problem as I mentioned below. https://github.com/Menci/vite-plugin-top-level-await/issues/64
Maybe it's a good idea to provide an option to decide whether produce top-level-await code or produce promise module and let user to handle the wasm async behavior instead of using vite-plugin-top-level-await with async contamination?