vitejs / vite

Next generation frontend tooling. It's fast!
http://vite.dev
MIT License
68.61k stars 6.2k forks source link

HMR does not work #3002

Closed xiaomuzizier closed 3 years ago

xiaomuzizier commented 3 years ago

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

Shinigami92 commented 3 years ago

Could you create a small reproducible repo, that will help other contributors to jump straight into the issue and may provide help faster 🙂

It's really hard to look into that many images that are oversized and it's not possible to copy text from them

Hujianboo commented 3 years ago

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?

JinJieTan commented 3 years ago

I had the same problem,HRM not work

xiaomuzizier commented 3 years ago

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

xiaomuzizier commented 3 years ago

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?

Could you create a small reproducible repo, that will help other contributors to jump straight into the issue and may provide help faster 🙂

It's really hard to look into that many images that are oversized and it's not possible to copy text from them

ok. I will sort it out.thx!!

Hujianboo commented 3 years ago

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

thx! it works!

xiaomuzizier commented 3 years ago

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:#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

thx! it works!

but ennnn. Do you have the same promblem(hmr does not work) just like me?or maybe you are not here yet?

Hujianboo commented 3 years ago

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:#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

thx! it works!

but ennnn. Do you have the same promblem(hmr does not work) just like me?or maybe you are not here yet?

sorry i do not have the problem you mentioned.but do you define the entrance of the project in vite.config.ts correctly? because you change the App.tsx to Index.tsx. you can open the chrome devtool to see the whether the Githubissues.

  • Githubissues is a development platform for aggregating issues.