Amend examples and docs to reflect that chokidar watcher needs to be closed for build to finish #1075
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.
Description
I discovered -- after much confusion -- that if you have a persistent chokidar watcher set up in your
static.config.js
and you try to runreact-static build
, the build will successfully complete, but then hang forever. This PR amends the examples and docs to reflect that the watcher needs to be closed inonBuild
.Doesn't look like this repo has any integration tests, otherwise I would've added one for verifying that a build that uses chokidar doesn't time out.
It looks like at least one or two of these examples are bit by #985, so this won't fundamentally make them work -- changing any content will still completely break react-static and will require a server restart to make things work again. But at least builds will work on CI (and won't require being ctrl-c'd out of locally). fwiw #985 seems like a serious, critical bug and I'm not sure react-static is usable in a lot of scenarios until it's fixed.
On another note, I'm not sure why the examples were all "deprecated" in one fell swoop -- many of them contain useful info that still isn't available in guides. I saw the explanation in the docs about why this happened, but I also think that examples and guides serve complementary usecases; some people find it easier to get started from one or the other. (next.js's examples directory might seem a little extreme, but I really appreciate that they put work in to keep all of them up-to-date and to explain the motivation behind each one.)
Changes/Tasks
Types of changes
Checklist: