Expose `RuntimeLoader`'s WASM file
Hi,
I've read your docs on how to preload the WASM file, and they are very useful if you're looking to in-line the WASM file. Unfortunately, the added bundle size is a tradeoff I'm currently unable to make.
We are currently preloading the unpkg url directly, ie by adding a preload link in the head like so:
The issue is that this url changes often when the @rive-app/react-canvas is updated, which breaks this prefetching. Is there any way to expose the current URL, so that we can dynamically generate the preload link and no manual work is necessary in order to ensure we are preloading the correct URL?
I see that on RuntimeLoader there is a private wasmURL - is that something that could be exposed upstream?
Alternatively we are also looking into self-hosting the WASM, but we also run into the issue of the ensuring the WASM file is up to date with the current Rive package version.
Thank you!
Hi @slin12 , great suggestion, we'll expose this.
This has been exposed as getWasmUrl in RuntimeLoader. Closing this, but let us know if you run into issues.