Rive.wasm blocking website load
See original GitHub issueI am currently developing a Gatsby website that uses a few Rive animations with the help of rive-react
.
In development it works great, however whenever building my website the loading speeds for the first paint get very slow.
I noticed that a 3rd party request to get rive.wasm
is what is blocking my website.
I am attaching some screenshots below.
Do you have any advice how I can make the request faster? Is it possible to host the rive.wasm file e.g. on my own server?
Any help is appreciated!
Here is the request summary, which shows it took 93ms to get the rive file:
These are the request details:
Issue Analytics
- State:
- Created a year ago
- Comments:12 (2 by maintainers)
Top Results From Across the Web
FAQ - Rive Guide
I have Content-Security-Policy set to block unsafe-eval, and now Rive fails to load. What do I do? ... Our Web (JS) runtime is...
Read more >Failures against Content Security Policy of your site blocks the ...
Hi, I'm noticing that the .js main application created through emscripten/wasm is blocked by chrome when using "Content-Security-Policy", ...
Read more >The dark side of WebAssembly - Virus Bulletin
In this paper we will walk through some of the instances in which Wasm can be used maliciously, such as: Tech support scams:...
Read more >Rust and WebAssembly
wasm -game-of-life/www/index.html. This is the root HTML file for the Web page. It doesn't do much other than load bootstrap.js , ...
Read more >Blocked - Blazor webassembly .DLL files failed to download
My work runs Sophos, which appears to allow DLLs to be served if you're serving them from a site using SSL - perhaps...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Actually, you might be able to host the WASM file on your own server and be able to serve this up!
We can work on making the URL you’d like to set as a param you pass into
<Rive>
oruseRive()
but you could do this in the meantime, and then it shouldn’t try to request thewasm
fromunpkg
by default.To download the correlated WASM file for your server, check out the dependency version of
@rive-app/canvas
in the tagged version of@rive-app/react-canvas
you’re consuming. For example,1.0.71
: https://github.com/rive-app/rive-react/blob/v3.0.15/package.json#L32The correlated WASM file should be the following URL with the version identified above:
@carolinmaisenbacher @3lonious
Thank you for your detailed reply @zplata! Your solution of setting the wasm url with
setWasmUrl
worked flawlessly for me.