This repository was archived by the owner on Feb 15, 2023. It is now read-only.
Stop sirv before reloading rollup#213
Open
ranjan-purbey wants to merge 2 commits intosveltejs:masterfrom
Open
Conversation
Fixes sveltejs#199 Rollup reloads the config on detecting changes in it. This should also restart the `sirv` server. But the current config keeps creating new instances of `sirv` on each reload without properly stopping the previous ones. This PR fixes that behaviour.
Member
|
I'm not convinced that killing the process by spawning I've not noticed the template spinning up endless copies of |
Author
|
@antony You'll probably notice the issue if you try to edit and save rollbar config while the server is running as mentioned in the attached issue |
lukeed
reviewed
Feb 23, 2021
| }, | ||
| /* Rollup restarts on detecting changes to this config file. | ||
| This hook makes sure the previously started sirv instance is stopped before starting a new one */ | ||
| closeWatcher: toExit, |
Member
There was a problem hiding this comment.
This is the main fix here.
I think we can skip the kill workaround by just removing shell: true on the spawner
Author
There was a problem hiding this comment.
I have tried that, but a shell is spawned regardless. The shell is spawned by npm.
wlach
added a commit
to irydium/irydium
that referenced
this pull request
Jan 9, 2022
* Properly restart server on code changes on Linux (based on sveltejs/template#213) * Add a short delay before reloading to wait for any dependencies to finish saving
wlach
added a commit
to irydium/irydium
that referenced
this pull request
Jan 9, 2022
* Properly restart server on code changes on Linux (based on sveltejs/template#213) * Add a short delay before reloading to wait for any dependencies to finish saving
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #199
Rollup reloads the config on detecting changes in it. This should also restart the
sirvserver. But the current config keeps creating new instances ofsirvon each reload without properly stopping the previous ones. This PR fixes that behaviour.