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

File not refreshing #18

Closed
jeremenichelli opened this issue Oct 6, 2018 · 6 comments
Closed

File not refreshing #18

jeremenichelli opened this issue Oct 6, 2018 · 6 comments

Comments

@jeremenichelli
Copy link

Maybe I'm doing something wrong, but for some reason just running sirv with an index.html and a script file, I change my script file, refresh and the script does not update. I'm running v0.2.2, do I need a special flag? I guess I shouldn't since it's just a static need.

@lukeed
Copy link
Owner

lukeed commented Oct 6, 2018

Hey! You do need the --dev flag if you're using the CLI. It's opts.dev if you're using middleware.

Sirv assumes production mode by default, and in production you don't want to be constantly hitting the filesystem.

Hope that helps!

@lukeed lukeed closed this as completed Oct 6, 2018
@jeremenichelli
Copy link
Author

Oh cool. Should I open a PR with some warning o better flagging of this. It wasn't that obvious from the README, or maybe I was reading the wrong one 🤔

@aubergene
Copy link

I'm experiencing this issue too with sirv 0.2.2, I'm using the --dev flag. I came across the issue from using Svelte template. Tried in Firefox and Chrome.

@lukeed
Copy link
Owner

lukeed commented Oct 28, 2018

Is it possible you have any lingering cache headers or service workers running?

The dev mode for sirv maintains zero cache & traverses the filesystem every time a request reaches it. I'm thinking either of those two are fulfilling the request before it hits your server

@aubergene
Copy link

Wait, no I'm tired an misreading what --dev does, I thought it set up a watcher, but it's just that it sets params suitable for dev. Everything working as expected, sorry for the issue and thanks for the very quick response!

@lukeed
Copy link
Owner

lukeed commented Oct 28, 2018

No problem! My eyes often play tricks on me too

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

3 participants