Skip to content

Webpack dev server does NOT hot reload (affecting swizzle aliases, prism...) #10238

Open
@slorber

Description

@slorber

Description

As far as I know, to this day, it is not possible to update Webpack Dev Server config while the dev server is running (webpack/webpack-cli#15)

Unfortunately, we need this for Docusaurus, otherwise there are many situations requiring users to restart the Docusaurus dev server (docusaurus start), notably:

If no solution is provided by Webpack, we may need to stop/recreate the dev server ourselves in cases we are able to detect. Detecting aliases changes might be the lowest hanging fruit to implement.

Steps to reproduce

Swizzle any component while the dev server is running: the new swizzled copy is added to your site but if you modify it nothing happens. This is because Webpack is still loading the original files. Webpack should load the new swizzled files

Your environment

  • Docusaurus version used: 3.4

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 executiondomain: dxRelated to developer experience of working on Docusaurus sites

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions