Closed jeremenichelli closed 6 years ago
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!
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 🤔
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.
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
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!
No problem! My eyes often play tricks on me too
Maybe I'm doing something wrong, but for some reason just running
sirv
with anindex.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.