sapper dev
watcher sometimes loses track of a file if editor save does a write-then-replace #949
Description
Describe the bug
After introducing and removing an HTML error from a .svelte
file, sapper dev
stops watching and building.
Logs
src/routes/index.svelte changed. rebuilding...
✗ server
/home/at/code/js/sapper-template-rollup/src/routes/index.svelte
<input> is a void element and cannot have children, or a closing tag
44: </figure>
45:
46: <input type="text"></input>
^
47:
48: help!
✗ client
/home/at/code/js/sapper-template-rollup/src/routes/index.svelte
<input> is a void element and cannot have children, or a closing tag
44: </figure>
45:
46: <input type="text"></input>
^
47:
48: help!
✔ service worker (9ms)
^C
To Reproduce
git clone https://github.com/sveltejs/sapper-template-rollup
cd sapper-template-rollup && yarn install && yarn run dev
- In IntelliJ IDE with default settings, add invalid HTML in
src/routes/index.svelte
e.g.<input type="text"></input>
, save, make the HTML valid again, save - Observe no more automatic builds even after error is removed; need to restart
sapper dev
.
Expected behavior
Continued builds :-)
Information about your Sapper Installation:
-
Your browser and the version: (e.x. Chrome 52.1, Firefox 48.0, IE 10)
Chromium 77.0.3865.120 -
Your operating system: (e.x. OS X 10, Ubuntu Linux 19.10, Windows XP, etc)
NixOS 19.09 -
Your hosting environment: (i.e. Local, GCP, AWS, Now, etc...)
-
Sapper version (Please check you can reproduce the issue with the latest release!)
sapper, 0.27.9 -
Svelte version (Please check you can reproduce the issue with the latest release!)
├─ svelte@3.12.1 -
If it is an exported (npm run export) or dynamic application.
-
Whether your application uses Webpack or Rollup
Rollup
Additional context
# node --version
v12.12.0
# yarn --version
1.19.1
# uname -a
Linux ra 4.19.80-hardened #1-NixOS SMP Thu Oct 17 20:45:44 UTC 2019 x86_64 GNU/Linux