Kevin Tale
How to add a simple live reload?
so if I understand correctly your library allow to add hot reload functionality without having to manually add the websocket code to our index.html? It also recompile if src/ has change and simply reload the browser if the webapp per se changes (or just change the stylesheet if css files have change). Is that correct?
30 replies
How to add a simple live reload?
thanks for the help.
It kinda helped but I dont have the expected behavior yet.
I've modified the code like so
And tried that
deno serve -A -r --watch main.ts
or that
deno serve -A -r --watch=index.html main.ts
And it seems that the Math.random()
will only trigger the first time localhost:8000
is requested (so basically when my browser access this url). But on file change it wont reload it even though I can indeed see the message Watcher Restarting! File change detected: "C:\\Users\\33646\\Documents\\labs\\deno\\main.ts"
in my console30 replies