go to Settings (Preferences) | Go | Vendoring & Build Tags and then select OS -> js and ARCH -> wasm.

https://youtrack.jetbrains.com/issue/GO-6128