trunk serve not hot reloading?

676 Views Asked by At

I am following along a walkthrough on how to use WebAssembly with Rust to build a simple web page.They mention that hosting the website locally using trunk serve should provide hot reloading where if I make changes to my code, I should see those changes have an effect on the website, but I am not.

I followed the video exactly so I don't know what I'm missing.

I have tried a few commands:

  1. trunk serve
  2. trunk serve --watch . No different from the first.
  3. cargo watch -c -- trunk serve Which I found here. Constantly reloads (without making changes to the source code) and I cannot connect.

When I open the web page (127.0.0.1:8080) and make a change to my html, no changes are shown on the web page (even after refreshing.) In order to see the changes, I have to CTRL+C out of the server and boot it back up (which is tedious and obnoxious.)

1

There are 1 best solutions below

1
On

As a temporary solution I have found using this command works: cargo watch -w .\src\ -s "trunk serve"