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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev server not hot reloading static file changes #5587

Closed
5 tasks done
seanwuapps opened this issue Sep 18, 2021 · 2 comments
Closed
5 tasks done

dev server not hot reloading static file changes #5587

seanwuapps opened this issue Sep 18, 2021 · 2 comments
Labels
bug An error in the Docusaurus core causing instability or issues with its execution

Comments

@seanwuapps
Copy link

馃悰 Bug Report

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io
  • I have read the console error message carefully (if applicable)

Description

dev server's HMR doesn't seem to pick up file changes inside the static folder

Have you read the Contributing Guidelines on issues?

yes

Steps to reproduce

While the dev server is running

  1. replace logo.svg or change its content
  2. notice the browser does not reflect change without a manual refresh.

Expected behavior

The browser automatically reflects static asset change.

Actual behavior

The browser does not auto reflect the change, have to do a manual page refresh.

Your environment

Reproducible demo

https://stackblitz.com/edit/github-y6dgvo?file=static/img/logo.svg

@seanwuapps seanwuapps added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Sep 18, 2021
@slorber
Copy link
Collaborator

slorber commented Sep 22, 2021

Thanks, we'll handle this after the upgrade of #5420

We currently use an express middleware for the static folder which should probably removed

@Josh-Cena Josh-Cena removed the status: needs triage This issue has not been triaged by maintainers label Oct 30, 2021
@lex111
Copy link
Contributor

lex111 commented Nov 1, 2021

Fixed in #5420, will be available in next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution
Projects
None yet
Development

No branches or pull requests

4 participants