fix(v2): use fswatch instead of timeout polling to wait for client manifest#1389
Merged
yangshun merged 3 commits intofacebook:masterfrom Apr 24, 2019
Merged
fix(v2): use fswatch instead of timeout polling to wait for client manifest#1389yangshun merged 3 commits intofacebook:masterfrom
yangshun merged 3 commits intofacebook:masterfrom
Conversation
Contributor
Author
|
Deploy preview for docusaurus-preview ready! Built with commit 2dc7d6b |
Contributor
Author
|
Deploy preview for docusaurus-2 failed. Built with commit 2dc7d6b https://app.netlify.com/sites/docusaurus-2/deploys/5cc07df18c4c1a000825989f |
Contributor
Author
yangshun
approved these changes
Apr 24, 2019
yangshun
pushed a commit
that referenced
this pull request
Apr 24, 2019
* fix(v2): fix hash-link css * fix(v2): use fswatch instead of timeout polling to wait for client manifest (#1389) * fix(v2): use chokidar/fswatch instead of polling w timeout to wait client-manifest * refactor -> less code * DRY code * Update styles.css * fix(v2): toggle hash-link opacity
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Optimize implementation of
WaitPlugin. It is better to use fs event system to wait for a file rather than using hacky polling timeout implementation with a timeout. Also, no need to wait forchunk-map.jsonbecause it is 100% guaranteed thatclient-manifest.jsonwill be generated afterchunk-map.jsonin client. So if manifest exist, chunk map will exist.This is an attempt to fix error due to timeout like below
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Production build still works
