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: pass pollOptions to webpack #7180

Merged
merged 7 commits into from
Apr 29, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/docusaurus/bin/docusaurus.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
JohnnyMcWeed marked this conversation as resolved.
Show resolved Hide resolved
)
.action(
async (siteDir, {port, host, locale, config, hotOnly, open, poll}) => {
Expand Down
6 changes: 6 additions & 0 deletions packages/docusaurus/src/commands/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ export async function start(
);

let config: webpack.Configuration = merge(await createClientConfig(props), {
watchOptions: {
ignored: [siteDir+'/**/node_modules'],
Josh-Cena marked this conversation as resolved.
Show resolved Hide resolved
poll: Number.isInteger(cliOptions.poll)
? cliOptions.poll
: false,
JohnnyMcWeed marked this conversation as resolved.
Show resolved Hide resolved
},
infrastructureLogging: {
// Reduce log verbosity, see https://github.com/facebook/docusaurus/pull/5420#issuecomment-906613105
level: 'warn',
Expand Down