How can I import a wasm file?

Dear all,
I’m developing a panel plugin where I would like to run some calculation on the client side using WebAssembly .
The problem is that I can’t import the wasm file with the requested functions.
Is there any workaround?
Thank you
Daniele

Did you get this working? I’d love to add it as code example in the docs!

Unfortunately I still did not get it working.
I have dedicated not much time to it.
The error message I get from console.log() is : TypeError: Response has unsupported MIME type
That is due to the unsupported content-type application/wasm of the grafana backend, I guess.
I don’t know where to put the hands for such modifications.
I now that create-react-app and NextJS have a native support to such files, but I don’t know what there is under the box in Grafana.
If you can give me some suggestions, I can try to solve the issue otherwise I do not have so much time to discover and learn how things works.

Maybe It is useful If I add some more details.
I used wasm with NextJS.
The wasm file was generated by the rust wasm-pack tool using the command: wasm-pack build.
Then, I usually import such file inside my react hook component by using the async function:

import('../wasm/package_name/pkg/package_name')

The same method is not working in the Grafana React panel component, because the browser log tells me:

TypeError: Response has unsupported MIME type