vite: HMR does not work
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:
my whistle:
I will use “cms.fcc.qq.com” open the page.
my html:
my component:
index.tsx use App.tsx:
App.tsx:
when I change something in GLHeaderMenu component. this will show ‘[vite] hmr update /src/App.tsx’ .the page does not update
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.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 20 (6 by maintainers)
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
.You can solve this problem through the following configuration.