From 90aa80a7062836099f645edfcccd706b3aed8499 Mon Sep 17 00:00:00 2001 From: JMW Date: Fri, 15 Apr 2022 17:20:19 +0200 Subject: [PATCH 1/6] Fixed bug for hot reload in Docker Likely related to https://github.com/facebook/docusaurus/issues/6722 --- packages/docusaurus/src/commands/start.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/docusaurus/src/commands/start.ts b/packages/docusaurus/src/commands/start.ts index 39da01713433..02905ec8746e 100644 --- a/packages/docusaurus/src/commands/start.ts +++ b/packages/docusaurus/src/commands/start.ts @@ -117,6 +117,12 @@ export async function start( ); let config: webpack.Configuration = merge(await createClientConfig(props), { + watchOptions: { + ignored: [siteDir+'/**/node_modules'], + poll: Number.isInteger(cliOptions.poll) + ? cliOptions.poll + : false, + }, infrastructureLogging: { // Reduce log verbosity, see https://github.com/facebook/docusaurus/pull/5420#issuecomment-906613105 level: 'warn', From 0e8ccfe48824fe931d91c9273d4777e90214bc80 Mon Sep 17 00:00:00 2001 From: JMW Date: Fri, 15 Apr 2022 17:22:29 +0200 Subject: [PATCH 2/6] Fixed bug for param input (int parsing) --- packages/docusaurus/bin/docusaurus.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/docusaurus/bin/docusaurus.mjs b/packages/docusaurus/bin/docusaurus.mjs index eee4fc9919e9..e6d57736e448 100755 --- a/packages/docusaurus/bin/docusaurus.mjs +++ b/packages/docusaurus/bin/docusaurus.mjs @@ -137,6 +137,7 @@ cli .option( '--poll [interval]', 'use polling rather than watching for reload (default: false). Can specify a poll interval in milliseconds', + parseInt, ) .action( async (siteDir, {port, host, locale, config, hotOnly, open, poll}) => { From d458fc3cd4daee5872809d28c8ad056c8f7a8e6d Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Wed, 20 Apr 2022 19:48:32 +0800 Subject: [PATCH 3/6] Update packages/docusaurus/src/commands/start.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sébastien Lorber --- packages/docusaurus/src/commands/start.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/docusaurus/src/commands/start.ts b/packages/docusaurus/src/commands/start.ts index 02905ec8746e..010609cdc44c 100644 --- a/packages/docusaurus/src/commands/start.ts +++ b/packages/docusaurus/src/commands/start.ts @@ -118,7 +118,7 @@ export async function start( let config: webpack.Configuration = merge(await createClientConfig(props), { watchOptions: { - ignored: [siteDir+'/**/node_modules'], + ignored: /node_modules\/(?!@docusaurus)/, poll: Number.isInteger(cliOptions.poll) ? cliOptions.poll : false, From 9f68dfe94d6dae18235c56cdc806a01b3d187bab Mon Sep 17 00:00:00 2001 From: JMW Date: Mon, 25 Apr 2022 10:25:43 +0200 Subject: [PATCH 4/6] Update packages/docusaurus/src/commands/start.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sébastien Lorber --- packages/docusaurus/src/commands/start.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/docusaurus/src/commands/start.ts b/packages/docusaurus/src/commands/start.ts index 010609cdc44c..dc56e3f5d5f0 100644 --- a/packages/docusaurus/src/commands/start.ts +++ b/packages/docusaurus/src/commands/start.ts @@ -119,9 +119,7 @@ export async function start( let config: webpack.Configuration = merge(await createClientConfig(props), { watchOptions: { ignored: /node_modules\/(?!@docusaurus)/, - poll: Number.isInteger(cliOptions.poll) - ? cliOptions.poll - : false, + poll: cliOptions.poll, }, infrastructureLogging: { // Reduce log verbosity, see https://github.com/facebook/docusaurus/pull/5420#issuecomment-906613105 From 1d36d296c9504c6bbe8cb6c601dac1f7e2536d09 Mon Sep 17 00:00:00 2001 From: JMW Date: Mon, 25 Apr 2022 10:25:51 +0200 Subject: [PATCH 5/6] Update packages/docusaurus/bin/docusaurus.mjs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sébastien Lorber --- packages/docusaurus/bin/docusaurus.mjs | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/docusaurus/bin/docusaurus.mjs b/packages/docusaurus/bin/docusaurus.mjs index e6d57736e448..eee4fc9919e9 100755 --- a/packages/docusaurus/bin/docusaurus.mjs +++ b/packages/docusaurus/bin/docusaurus.mjs @@ -137,7 +137,6 @@ cli .option( '--poll [interval]', 'use polling rather than watching for reload (default: false). Can specify a poll interval in milliseconds', - parseInt, ) .action( async (siteDir, {port, host, locale, config, hotOnly, open, poll}) => { From b6c38af41b5df850cd44bd5ec7c2145e9d10c13d Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Thu, 28 Apr 2022 11:53:13 +0800 Subject: [PATCH 6/6] redeploy