vite-plugin-vue-layouts
vite-plugin-vue-layouts copied to clipboard
HMR not working when changing style
I have the plugin set up with vite-plugin-pages. Changing the template will trigger auto reload, but changing the style will not - in fact I must restart the server to see the css changes.
<template>
<div class="wrapper">
<h1>Change me</h1>
<RouterView />
</div>
</template>
<style scoped>
.wrapper {
color: green;
}
</style>
same problem. In 0.6.0, either a template change or a style change will trigger vite hmr. But in 0.7.0, a template or style change will only reload the page, and the style change will not take effect yet.
same problem. In 0.6.0, either a template change or a style change will trigger vite hmr. But in 0.7.0, a template or style change will only reload the page, and the style change will not take effect yet.
Thanks. version 0.6.0 does work well. Hope a fix for 0.7 will come soon.
Same issue here with:
Dependencies:
- pinia
2.0.23 - vue
3.2.40 - vue-router
4.1.5
devDependencies:
- autoprefixer
10.4.12 - postcss
8.4.17 - tailwindcss
3.1.8 - vite
3.1.7 - vite-plugin-md
0.20.4 - vite-plugin-pages
0.26.0 - vite-plugin-vue-layouts
0.7.0 - markdown-it-anchor
8.6.5 - @vitejs/plugin-vue
3.1.2
Thank you.
same problem.
temporary workaround:
save vite.config.ts to restart the whole server
0.8.0 still not fixed. no hmr when save any changes to default.vue
@sistematico @hooray @grandsong @phamhongphuc @nimonian I rewrote this plugin。Using a simpler scheme, hmr is more accurate。Due to different principles, there is no such problem。you can try 👉 vite-plugin-vue-meta-layouts
I cannot duplicate in Vitesse, with Vite 5.0.5 https://github.com/antfu/vitesse
If you find an issue with that template and Vite 5, please open a new issue