question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[es-dev-server] stale files after git checkout

See original GitHub issue

I have started using es-dev-server to work on a large project (1000+ modules) and I really like the fact that it sets proper cache headers. This feature dropped the development loading time from 10s to 1.5s (I was using polymer serve).

Unfortunately, I ran into a problem: the server sends stale responses after switching branches. This is the scenario:

  1. checkout master
  2. start es-dev-server
  3. edit a file
  4. confirm that latest version is served
  5. checkout feature branch
  6. confirm that feature branch code is served
  7. edit the same file
  8. notice that the feature branch version is still served, instead of the edited code

if 8 did not happen, then checkout master again and notice that the code from 7. is still served.

This staleness does not go away until I restart the server, no matter how many times I edit and save the file.

This is not a browser cache problem, as I have tested this with disabled cache (via network panel).

My hunch is that it’s somehow related to the filesystem change event, but I have yet to look in the es-dev-server internals.

P.S. Thank you for this awesome project! ❤️

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
cristineculacommented, Nov 4, 2019

I have tried to replicate the issue, but it does not seem to happen anymore. The load time was not affected by this change. Thank you very much for resolving this! 🥂

1reaction
bennypowerscommented, Nov 4, 2019

Closing as solved. Thank you for the issue. Please tell us if this continues to be a problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

git status shows modifications, git checkout -- <file> doesn't ...
For some reason, after I switched back to "develop" branch, some seemingly random files persisted and were showing up as "modified" in "git...
Read more >
Issue with watching a deleted, then recreated directory #917
Versions (please complete the following information): Chokidar ve... ... [es-dev-server] stale files after git checkout open-wc/open-wc#930.
Read more >
Using NodeJs packages in the browser with import maps
Import maps is a browser proposal that allow web pages to control the behavior of JavaScript imports, in this article will cover the...
Read more >
es-dev-server - npm
Start using es-dev-server in your project by running `npm i es-dev-server`. There are 17 other projects in the npm registry using es-dev-server.
Read more >
LostInBrittany/granite-clipboard - webcomponents.org
View on GitHub. Star on GitHub ... Inherited from UpdatingElement ... {any} (optional) old value of requesting property. static requestUpdateInternal( ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found