How to make live-server stop refreshing when nothing changed
Asked Answered
F

2

4

I love live-server as a tool for auto-updating a project when changes are made, but I can't bare to use it anymore because it just refreshes WAY too frequently (about every 10-15 seconds) on my Mac.

I can't find what's changing or even IF any files are actually changing. I thought it might be detecting .DS_Store but looking at those files, none of them have a modified time late enough to be the culprit. The verbose logs just show that almost all of my folders in the project changed all at once. All I know for sure is that I'm not manually changing anything.

Anyone have any ideas or even suggestions for a "better" reload-on-change CLI option?

Facing answered 8/8, 2017 at 19:33 Comment(0)
F
3

The issue appears to have to do with the fact that I'm using a network shared drive with live-server. If I move the project to my local machine, the problem goes away.

Facing answered 24/9, 2017 at 2:22 Comment(2)
Wayne, I agree that that is the problem. I recently bought the 2018 Mac Mini. Because it relies on an SSD for everything, I was relying on thumb drives for more storage because 256 GB wasn't enough and I've been relying on thumb drives to give me more storage. Because I was doing that, I had the same problem as you. I was still troubleshooting the problem and decided to try running my program off of the main hard drive and it worked fine.Wenn
Thanks for confirming Jeremy!Facing
F
2

You can try https://www.npmjs.com/package/nodemon

It allowes you to add the Argument

--ignore ...

To ignore files or a whole Directory

Foresight answered 8/8, 2017 at 20:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.