I don't know much about these .wasm files.
In browser javascript, whenever I import the way of the readme
import init, { PathfindingWasm } from "./pkg/pathfinding3d.js";
await init();
it sends me this error :
Failed to load module script: Expected a JavaScript-or-Wasm module script but the server responded with a MIME type of "application/wasm". Strict MIME type checking is enforced for module scripts per HTML spec.
On the internet, people says .wasm should be imported/instanciated this way :
const wasm = await WebAssembly.instantiateStreaming(
fetch("./pathfinding3d_bg.wasm")
);
Can someone explain how to make this library work ?
i'd like to use it in both vanilla-js and webpack (production & dev-server)
thank you.
I don't know much about these .wasm files.
In browser javascript, whenever I import the way of the readme
it sends me this error :
Failed to load module script: Expected a JavaScript-or-Wasm module script but the server responded with a MIME type of "application/wasm". Strict MIME type checking is enforced for module scripts per HTML spec.On the internet, people says .wasm should be imported/instanciated this way :
Can someone explain how to make this library work ?
i'd like to use it in both vanilla-js and webpack (production & dev-server)
thank you.