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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HMR not reloading the page #7155

Closed
jaytonic opened this issue Nov 16, 2022 · 2 comments
Closed

HMR not reloading the page #7155

jaytonic opened this issue Nov 16, 2022 · 2 comments
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. scope: hmr scope: slots

Comments

@jaytonic
Copy link

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 ( HMR not updating the page when editing a Vue page vitejs/vite-plugin-vue#3) vite is properly calling the __VUE_HMR_RUNTIME__.rerender
@iWatchYouFromAfar
Copy link

I faced the same problem and reproduced it.

Add any content to the slot of any Column component (or direct in link below). HMR will won't work.

https://codesandbox.io/p/sandbox/vue-3-vite-4-primevue-3-9rubvl?file=%2Fsrc%2Fcomponents%2FTable.vue&selection=%5B%7B%22endColumn%22%3A1%2C%22endLineNumber%22%3A41%2C%22startColumn%22%3A1%2C%22startLineNumber%22%3A40%7D%5D

@haoqunjiang haoqunjiang added the 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. label Apr 14, 2023
@martinszeltins
Copy link

martinszeltins commented Apr 14, 2023

I am having the same issue in Vue 3.3.0 - Bug: HMR does not work in 3.3 alpha 9

Another related issue: [Bug] Vue 3 HMR does not work inside a default slot using PrimeVue

IAmSSH pushed a commit to IAmSSH/core that referenced this issue May 14, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Sep 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. scope: hmr scope: slots
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants