Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore exclude problem #437

Open
DrErvin opened this issue Dec 17, 2024 · 0 comments
Open

Ignore exclude problem #437

DrErvin opened this issue Dec 17, 2024 · 0 comments

Comments

@DrErvin
Copy link

DrErvin commented Dec 17, 2024

Before submitting an issue, please, see https://github.com/tapio/live-server#troubleshooting

Issue description

My live-server keeps reloading the page when a change is detected in the data.json file that is hosted and acts as a mock JSON/API. Page reloading happens when the data from the form on the frontend app gets uploaded to the data.json file. I have tried running live-server with ignore commands but it always keeps detecting changes in data.json file. I have tried commands for ignore such as: >live-server --ignore="server/**", also >live-server --ignore='server/**' --no-browser --verbose, and >live-server --ignore="server/data.json". None seem to work and each give me the change detected in PATH\data.json and reload my page. I have checked that the dev server watch function does the change but it is not the case, my live-server does the change.
My question is how do I get the ignore function to work and not cause page reloading upon data.json changes.

Software details

I have my application running on port 8080 and the dev server running on port 3000. I am running the js server with express.js. I will provide the picture of my file structure. I will also provide picture of my package.json

  • Command line used for launching live-server: Mentioned above
  • OS: Windows 10 Pro
  • Browser (if browser related):
  • Node.js version: v21.7.1
  • live-server version: 5.7.9
    image
    image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant