I use this template for my project, I'm not similar to web development, so I don't know how to solve my problem.
Step1:
I build my crate with trunk build --release and put the dist directory to a nginx server.
Step2:
I modified my code and rebuild it .
after that, when I run the page, it's not updated. I find it only use my new wasm after I enter Ctrl + Shift + R to flush, or stop the service worker background manually.
I also tried to use the trunk config with hash = true to use a different wasm file name, but i don't know how to auto update the sw.js file.
How can i update the service worker after republish ?
I use this template for my project, I'm not similar to web development, so I don't know how to solve my problem.
Step1:
I build my crate with
trunk build --releaseand put the dist directory to a nginx server.Step2:
I modified my code and rebuild it .
after that, when I run the page, it's not updated. I find it only use my new wasm after I enter
Ctrl+Shift+Rto flush, or stop the service worker background manually.I also tried to use the
trunkconfig withhash = trueto use a different wasm file name, but i don't know how to auto update thesw.jsfile.How can i update the service worker after republish ?