feat(v2): add CLI option for polling #2630
Merged
+9
−1
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.
Motivation
I've been working with a project that likes to have repos contain VS Code devcontainers so that you can simply open the repo in VS code, load up a configured Docker container and away you go. I have this working 99 % with our Docusaurus 2 repos but live reloading does not work use the
fsevents
andinotify
methods used to watch for file changes in this case. Webpack Dev Server provides a polling alternative option for this and it is noted that this is recommended for such environments.Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
yarn start
to check works with no flag provide. Make some minor edits and check there is an instant reload. It does ✔yarn start --poll
which uses the newly add--poll
option to setwatchOptions.poll
totrue
. Make some minor edits and see a reload after a small delay from the 1 s polling time. It does ✔Related PRs
Docs are (I think) updated correctly. I could not quite ascertain the convention for adding to the changelog so I'm guessing that that is done at release?