Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose RuntimeLoader's WASM file #289

Open
slin12 opened this issue Sep 18, 2024 · 1 comment
Open

Expose RuntimeLoader's WASM file #289

slin12 opened this issue Sep 18, 2024 · 1 comment

Comments

@slin12
Copy link

slin12 commented Sep 18, 2024

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!

@HayesGordon
Copy link
Contributor

Hi @slin12 , great suggestion, we'll expose this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants