Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(v2): docusaurus start --poll 500 should work + better config load failure error #3622

Merged
merged 5 commits into from
Oct 21, 2020

Conversation

slorber
Copy link
Collaborator

@slorber slorber commented Oct 21, 2020

Motivation

Fixes #3620

docusaurus start --poll 500 should accept 500 as poll interval value

Also we should use polling for both webpack dev server and chokidar file watchers

Also improve the error message in such weird case so that user can understand we try to load the config from 500/docusaurus.config.js and that 500 is interpreted as the cli siteDir arg.

image

Have you read the Contributing Guidelines on pull requests?

yes

Test Plan

Local test and checking the correct args are forwarded to Webpack config

yarn start:v2
yarn start:v2 --poll
yarn start:v2 --poll 500

…ir is wrongly passed as a cli arg and lead to config loading failure
@slorber slorber requested a review from lex111 as a code owner October 21, 2020 16:05
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Oct 21, 2020
@slorber slorber added pr: bug fix This PR fixes a bug in a past release. and removed CLA Signed Signed Facebook CLA labels Oct 21, 2020
@docusaurus-bot
Copy link
Contributor

docusaurus-bot commented Oct 21, 2020

Deploy preview for docusaurus-2 ready!

Built with commit a9ef52c

https://deploy-preview-3622--docusaurus-2.netlify.app

Copy link
Contributor

@lex111 lex111 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's update our docs some more.
https://v2.docusaurus.io/docs/cli/#options

@slorber
Copy link
Collaborator Author

slorber commented Oct 21, 2020

Any idea what I should add? As we already ref the webpack watchOption link, maybe I should just make it more obvious that we can pass an arg?

(btw we don't do that for port/host neither currently)

image

@lex111
Copy link
Contributor

lex111 commented Oct 21, 2020

Any idea what I should add? As we already ref the webpack watchOption link, maybe I should just make it more obvious that we can pass an arg?

Yes, that will be enough.

@slorber slorber added the CLA Signed Signed Facebook CLA label Oct 21, 2020
@slorber slorber merged commit 44535f7 into master Oct 21, 2020
@lex111 lex111 added this to the v2.0.0-alpha.67 milestone Nov 17, 2020
@slorber slorber deleted the slorber/improve-config-loading-error branch August 17, 2021 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Poll option for docusaurus start doesn't work
4 participants