-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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 does not work with certain code in Vue #8224
Comments
Kapture.2022-05-19.at.03.46.12.mp4Vite and Webpack |
Looks similar to #7839. But it is interesting that this does not reproduce with webpack. |
Same issue, in my case i must restart the server to see change on certain file. But on other files it's work perfectly |
I have the same issue in react app. Change in one component triggers hrm as well as changes in its module.css file, but in the other component it does not. |
Same problem when upgrading vite from 2.9.9 to 2.9.12 |
Tried with Vite 3.0.0 but it still doesn't work properly |
I've tried to remove everything in a single page to the moment that HMR works fine, and I found that... HMR works: <template>
<Container class="mt-12">test</Container>
</template>
<script setup>
import { computed } from 'vue'
import { useRoute } from 'vue-router'
import Container from '@/components/app/Container.vue'
const route = useRoute()
const player = computed(() => route.params.player)
</script> HMR doesn't work: <template>
<Container class="mt-12">test</Container>
</template>
<script setup>
import { computed } from 'vue'
import { useRoute } from 'vue-router'
import Container from '@/components/app/Container.vue'
import { useCookies } from 'vue3-cookies'
const route = useRoute()
const player = computed(() => route.params.player)
</script> The only difference is single import: vue3-cookies (1.0.6): https://github.com/KanHarI/vue3-cookies |
Closing as I confirmed this worked after upgrading Vue to 3.2.38. |
Describe the bug
When using slot, the prop is not updated after modifying the prop of the child component.
Reproduction
Online: https://stackblitz.com/edit/vitejs-vite-z9guvb?file=App.vue&terminal=dev
Repo: https://github.com/sxzz/vite-hmr-issue
pnpm run dev
for Vite examplepnpm run serve
for Webpack exampleWebpack works normally, but vite didn't update prop.
System Info
Used Package Manager
pnpm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: