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

[BUG] HMR does not work inside a default slot using PrimeVue #11112

Closed
7 tasks done
martinszeltins opened this issue Nov 29, 2022 · 1 comment
Closed
7 tasks done

[BUG] HMR does not work inside a default slot using PrimeVue #11112

martinszeltins opened this issue Nov 29, 2022 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@martinszeltins
Copy link

Describe the bug

I don't know if this is an issue with Vite or Vue or PrimeVue... But Vite is directly involved in HMR so it could be a Vite issue.

If I change the content inside the TabPanel's default slot, HMR does not work automatically unless the page is reloaded. To reproduct this, simply clone run the reproduction repo and go to App.vue and change anything inside TabPanel default slot (line 9). Then if you look at the browser the content did not automatically update unless you refresh the whole page.

Reproduction

https://github.com/martinszeltins/vue-hmr-not-working-slot

Steps to reproduce

  1. Clone and run the project.
$ git clone git@github.com:martinszeltins/vue-hmr-not-working-slot.git
$ cd vue-hmr-not-working-slot
$ npm install
$ npm run dev
  1. Now open App.vue and change the default slot of TabPanel (line 9). Then save the App.vue file and look at the browser - HMR did not work unless you manually reload the page.

All I did was take the Vite starter template and added PrimeVue.

$ npm create vite@latest my-vue-app -- --template vue
$ cd my-vue-app
$ npm install
$ npm install primevue@^3 --save
$ npm install primeicons --save

Then I added PrimeVue to main.js like this:

import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import PrimeVue from 'primevue/config'
import AppModal from 'primevue/dialog'

const app = createApp(App);

app.use(PrimeVue);
app.component('AppModal', AppModal);
app.mount('#app')

And then I added the component in App.vue as you can see from the reproduction repo. I didn't change anything else. Something is wrong.

System Info

System:
    OS: Linux 5.15 Ubuntu 20.04.5 LTS (Focal Fossa)
    CPU: (8) x64 Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz
    Memory: 9.56 GB / 31.26 GB
    Container: Yes
    Shell: 5.8 - /usr/bin/zsh
  Binaries:
    Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
    Yarn: 1.22.19 - /usr/bin/yarn
    npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm
  Browsers:
    Chrome: 107.0.5304.121
    Firefox: 107.0
  npmPackages:
    vue: ^3.2.41 => 3.2.45
    primevue: 3.20.0
    vite: 3.2.3

Used Package Manager

npm

Logs

No response

Validations

@sapphi-red
Copy link
Member

Duplicate of vitejs/vite-plugin-vue#3

This is an upstream bug (vuejs/core#7155)

@sapphi-red sapphi-red closed this as not planned Won't fix, can't repro, duplicate, stale Nov 29, 2022
@sapphi-red sapphi-red added duplicate This issue or pull request already exists and removed pending triage labels Nov 29, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants