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

Web target with hash included in wasm pkg files to solve cache issues #2384

Open
Slixe opened this issue Nov 2, 2024 · 1 comment · May be fixed by #2387
Open

Web target with hash included in wasm pkg files to solve cache issues #2384

Slixe opened this issue Nov 2, 2024 · 1 comment · May be fixed by #2387
Labels
awaiting Waiting for responses, PR, further discussions, upstream release, etc enhancement New feature or request

Comments

@Slixe
Copy link

Slixe commented Nov 2, 2024

Is your feature request related to a problem? Please describe.
I have an web application using WebAssembly behind cloudflare, even if the cache is fully disabled, some browsers still keep the old WASM & js files when we do an update.

Describe the solution you'd like
Having a hash concatened to the filename for easier update would be better.

Describe alternatives you've considered
Doing by hand using a bash script. But I don't know where it's exactly loaded by flutter.

@Slixe Slixe added the enhancement New feature or request label Nov 2, 2024
@fzyzcjy
Copy link
Owner

fzyzcjy commented Nov 2, 2024

Looks reasonable! Looks like it is loaded in

final script = web.HTMLScriptElement()..src = '$root.js';
, loaded from https://github.com/fzyzcjy/flutter_rust_bridge/blob/master/frb_dart/lib/src/loader/_web.dart. It may not be too hard, and we even has some (pseudo) content hash computed in .

Feel free to PR for this! Alternatively, I may work on this feature request later.

@fzyzcjy fzyzcjy added the awaiting Waiting for responses, PR, further discussions, upstream release, etc label Nov 2, 2024
@Slixe Slixe linked a pull request Nov 2, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting Waiting for responses, PR, further discussions, upstream release, etc enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants