-
Notifications
You must be signed in to change notification settings - Fork 802
Do not watch Rollup config file #199
Description
Note: While this is problematic, we might be able to kick the can on it because of the upcoming Svelte Kit release.
Off hand, not even sure if we can tell Rollup to ignore its own file.
Any changes made to rollup.config.js automatically triggers Rollup to rebuild itself. This reinvokes the entire plugins[] list, which not only can be slow, but reinitializes a new sirv process.
Because Rollup clears reference to its previous rollup.config.js, the server reference resets to undefined, forcing a new server subprocess.
After a few modifications to my config, I saw I had 16 node processes running in Activity Monitor.
Then after shutting down dev script, 3 nodes remain, meaning that the Rollup resets make it possible for our npm start subprocesses to be detached.
Logs
$ rollup -c -w
rollup v2.35.1
bundles src/main.js → public/build/bundle.js...
created public/build/bundle.js in 211ms
[2020-12-14 22:17:43] waiting for changes...
> [email protected] start /Users/lukee/repos/testing/svelte-template
> sirv public "--dev"
Your application is ready~! 🚀
- Local: http://localhost:5000
- Network: Add `--host` to expose
────────────────── LOGS ──────────────────
bundles src/main.js → public/build/bundle.js...
created public/build/bundle.js in 91ms
[2020-12-14 22:17:51] waiting for changes...
[22:17:52] 200 ─ 2.64ms ─ /
[22:17:52] 200 ─ 0.44ms ─ /global.css
[22:17:52] 200 ─ 0.22ms ─ /build/bundle.css
[22:17:52] 200 ─ 0.95ms ─ /build/bundle.js
[22:17:52] 200 ─ 0.66ms ─ /favicon.png
bundles src/main.js → public/build/bundle.js...
created public/build/bundle.js in 65ms
[2020-12-14 22:17:57] waiting for changes...
Reloading updated config...
bundles src/main.js → public/build/bundle.js...
created public/build/bundle.js in 134ms
[2020-12-14 22:18:07] waiting for changes...
> [email protected] start /Users/lukee/repos/testing/svelte-template
> sirv public "--dev"
Your application is ready~! 🚀
➡ Port 5000 is taken; using 64353 instead
- Local: http://localhost:64353
- Network: Add `--host` to expose
────────────────── LOGS ──────────────────