Closed Drumsin closed 2 years ago
Found that there is customWasmUri param. Is there a way I can run this locally with webpack and without a server? I'm getting cross site scripting security errors if I point it locally to my file system.
The glue.wasm
file it's necessary because it is basically the lua engine compiled to webassembly. If you want to host it by yourself with webpack, you can check my project that does exactly this: https://github.com/ceifa/try-lua
Thanks for the quick response and example. This is exactly what I needed, thank you for building a great tool.
I changed my code like how you set yours up with import. No way around making an xhr request for glue.wasm?
My goal is to open my dist/index.html locally on my file system without a web server and have it work, but I get CORS blocking for the glue.wasm even though it's on the same system locally.
@Drumsin I'm not sure if that is possible, maybe you can try something like the ffmpeg solution: https://github.com/ffmpegwasm/ffmpeg.wasm/blob/master/src/browser/getCreateFFmpegCore.js
Another possible solution is to preload the wasm file as a data URL with webpack and create a blob URL from it.
Why does this make a request here? What does this do? Do I have to make this request? It's not secure.
node_modules/wasmoon/dist
this.customWasmUri = 'http://unpkg.com/wasmoon/dist/glue.wasm';
Thank you