Subscribe on changes!

HMR not reloading the page

avatar
Nov 16th 2022

Vue version

3.2.45

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-p3165e?file=src%2Fcomponents%2FHelloWorld.vue,package.json&terminal=dev

Steps to reproduce

  1. Open App.vue
  2. Add some texts inside of <HelloWorld>....</HelloWorld>

What is expected?

The HMR update should reload the page to apply the changes

What is actually happening?

You can see in the console that an HMR udpate is broadcasted. [vite] hmr update /src/App.vue

In the chrome devtools, you can see the update being broadcasted: [vite] hot updated: /src/App.vue

But nothing is updated

System Info

System:
    OS: Windows 10 10.0.22621
    CPU: (20) x64 Intel(R) Core(TM) i9-10850K CPU @ 3.60GHz
    Memory: 14.96 GB / 31.86 GB
  Binaries:
    Node: 16.14.2 - C:\Program Files\nodejs\node.EXE
    npm: 8.12.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.22621.819.0), Chromium (107.0.1418.24)
    Internet Explorer: 11.0.22621.1
  npmPackages:
    vue: ^3.2.45 => 3.2.45

Any additional comments?

  1. The issue is the same, no matter if the Vue project is served through vite or vue cli
  2. According to @sapphi-red ( https://github.com/vitejs/vite-plugin-vue/issues/3) vite is properly calling the __VUE_HMR_RUNTIME__.rerender
avatar
Feb 2nd 2023
avatar
Apr 14th 2023