-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
Hydration mismatch warning in vue >=3.4 (nuxt >=3.9) if an SVG uses url(#id)
#344
Comments
Start a new pull request in StackBlitz Codeflow. |
I encountered the same problem, I roll back the vue version to 3.3.8. perhaps because of this: vuejs/core#10011 |
I'm also having similar issue. @userquin can you help us with this? any suggestions? |
We resolved it with this patch using pnpm
|
You should use nuxt icon instead, iirc nuxt icon now supports iconify icons and Anthony fix the SSR problem: nuxt/icon#199 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Hello! I started to get hydration mismatch warnings in Vue 3.4 (Nuxt 3.9) on custom SVGs that have
url(#id)
expressions.This is happening because here https://github.com/unplugin/unplugin-icons/blob/68ec8987b75537b79d5fb526d58d81b910d6a77e/src/core/svgId.ts different IDs are generated on client and server.
I'm not totally sure why this is needed, but at least having a way to disable this behavior would be nice. (Or perhaps you can now somehow make use of Nuxt 3.10's
useId
?)By the way, I had an idea to patch-package the random ID generation, but was stopped by the fact that the compiled file that includes this code has a random name (chunk-...). I'm wondering why it is so?
Reproduction
https://stackblitz.com/edit/nuxt-starter-hglscy?file=assets%2Ficons%2Flogoo.svg
System Info
Doesn't matter, I believe.
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: