Webpack dev server does NOT hot reload (affecting swizzle aliases, prism...) #10238
Open
1 task done
Labels
bug
An error in the Docusaurus core causing instability or issues with its execution
domain: dx
Related to developer experience of working on Docusaurus sites
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:docusaurus swizzle
modifies Webpack aliases, affecting module resolution (see my comment docs: important warning in markdown-features-react.mdx #10236 (comment))prism
syntax highlighting language (see Dev mode breaks when additional languages are added #7913)configureWebpack
)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
Self-service
The text was updated successfully, but these errors were encountered: