Skip to content

Cannot use hot reloading in Docker (continuation of #6722) #8306

@dirslashls

Description

@dirslashls

Have you read the Contributing Guidelines on issues?

Prerequisites

Description

Issue #6722 has been fixed by passing the --poll CLI option as a watch option to WebPack. However, webpack expects the value to be passed either as a number or boolean. As a result, the cli option which ends up passing as a string errors out.

Just simply trying

docusaurus start --poll 1000

gives the following error

[ERROR] ValidationError: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
 - configuration.watchOptions.poll should be one of these:
   number | boolean
   -> Enable polling mode for watching.
   Details:
    * configuration.watchOptions.poll should be a number.
      -> `number`: use polling with specified interval.
    * configuration.watchOptions.poll should be a boolean.
      -> `true`: use polling.

Reproducible demo

No response

Steps to reproduce

Locally run the following and see the error

docusaurus start --poll 1000

Expected behavior

Ideally the watching should take effect by polling.

Actual behavior

The server doesn't start and errors out.

See webpack/webpack#3048 which mentions similar issue of passing the option via env variable which is treated as a string.

Your environment

No response

Self-service

  • I'd be willing to fix this bug myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its executiongood first issueIf you are just getting started with Docusaurus, this issue should be a good place to begin.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions