I’m trying to have live-server auto reload the code once I save my change.
I’ve installed live-server globally and created a folder test
and put 3 files in there
mkdir test
cd test
touch index.html main.js .live-server.json
live-server
Here’s the contents of index.html
<script src='main.js'></script>
Here’s the contents of main.js
console.log('hi');
and I got ‘hi’ in my chrome dev console.
When I changed the code, I got
Change detected /Users/ubuntu/dev/test/main.js
However, my chrome dev console didn’t yield that change. I have to refresh the page manually. How do I make my change auto loaded?