question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HMR does not work

See original GitHub issue

Describe the bug

I see this HMR didn’t work for dynamic imported modules ,I also have this issue. but I have another problem in react.

for example:

my vit config:

image

my whistle: image

I will use “cms.fcc.qq.com” open the page.

my html: image

my component:

index.tsx use App.tsx: image

App.tsx: image image

when I change something in GLHeaderMenu component. this will show ‘[vite] hmr update /src/App.tsx’ .the page does not update image

hmr does not work .

Reproduction

System Info

Output of npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers:


Used package manager:

Logs



Before submitting the issue, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the docs.
  • Check that there isn’t already an issue that reports the same bug to avoid creating a duplicate.
  • Provide a description in this issue that describes the bug.
  • Make sure this is a Vite issue and not a framework-specific issue. For example, if it’s a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
  • Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:20 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
xiaomuziziercommented, Dec 3, 2022

The cache may cause the problem.? I also use whistle just like you. can you tell me the reason of using http but not https? the page is refreshing continuely when I set the https in whistle even I set https: true in vite.config . Do you have the same promblem just like me?

see this:https://github.com/vitejs/vite/issues/2968

I encountered the problem you mentioned, because we use whistle. the websocket connection failed and caused the reswiping. see image

.You can solve this problem through the following configuration. image

0reactions
xiaomuziziercommented, Dec 3, 2022

I think we can close this issue @xiaomuzizier, as @Sociosarbis explained, this could be a request for the react fast refresh team.

ok,thx!

Read more comments on GitHub >

github_iconTop Results From Across the Web

HMR not working on webpack 5.66.0 · Issue #15206 - GitHub
Hot module reloading is not working after updating webpack to v5.66.0. If the current behavior is a bug, please provide the steps to ......
Read more >
webpack hot module replacement not working - Stack Overflow
when I run npm run start then I change the background color of the span the update works the first time (BUT IT...
Read more >
HMR API - Vite
A module that "accepts" hot updates is considered an HMR boundary. Note that Vite's HMR does not actually swap the originally imported module:...
Read more >
Understanding webpack HMR beyond the docs - Jakob Lind
I have attacked this problem from many different angles. Reading docs was not enough. I have also read webpack source code, and reverse...
Read more >
Hot Module Replacement - webpack
Let's go through some different viewpoints to understand exactly how HMR works... In the Application. The following steps allow modules to be swapped...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found