-
-
Notifications
You must be signed in to change notification settings - Fork 173
Class names hydration mismatches when using SSR and SCSS styles with module
#477
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
Comments
module
module
I couldn't grasp you description in details, but can you confirm the same issue happens for simple css too? without <style lang="css" module>
.header {
/* hydration error after changing this to `color: green` */
color: red
}
</style> What's happening looks normal in terms of Vite's behavior, so you might need to check with renderer side. Probably asking on https://github.com/vitejs/vite-plugin-vue/ is better. Also can you check this #146? It looks like there's a known issue with css module hmr. |
duplicate of #146 |
Describe the bug
Without module attribute on <style> Vue SSR correctly handles updates to .scss files that are imported via @use ... at-rule.
However, with module attribte it fails to watch changes to style files or something else breaks with hydration mismatches related to hashed class names so only making manual changes to .vue file will re-sync the updates.
It is also not related to flexible path options when using @use. The bug occurs no matter how you use style files: with .scss extension and without it, omitting _ at the beginning or not.
Reproduction
https://stackblitz.com/edit/github-bea9um
Steps to reproduce
Just create an external
.scss
file, define any mixin and then@include
that mixin in any.vue
file<style lang="scss" module>
tag.Changing the
.scss
fill will break all files that@use
this style file.System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: