-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
don't recreate <style>
tags if we're able to dedupe
#45
Comments
🎉 This issue has been resolved in version 0.7.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@egoist I think the problem still exists in case of updating existing attributes. Line 137 in 5ef9b62
class then we will have a flickering screen as the below example.
<style>
body.dark {
background-color: black;
}
</style>
<body class="dark" data-head-attrs="class">
...
</body> |
@nndnha try https://github.com/vueuse/head/releases/tag/v0.7.4 btw nice avatar |
@egoist Thanks for your quick fix. It was not easy to describe this problem so here is the real code that I will use it to try to verify the bug. In this demo I will use https://stackblitz.com/edit/vue-qwpubu?file=public%2Findex.html The problem comes when we call |
@egoist Here is the better version https://codesandbox.io/s/dank-voice-eu4hx?file=/app.vue You need to refresh the page to see the result. We can see that the browser will always received this content by Nuxt's server side rendering process <html class="dark" data-head-attrs="class">... And it will make the whole page dark, after hydration client will firstly remove |
@egoist Can you please confirm the bug? |
This is still extremely broken. This line removes all link tags that aren't controlled by vueuse/head: Line 208 in 392e8c8
If I remove that then this section does the same thing when run by vite-ssg because Lines 213 to 218 in 392e8c8
|
Perhaps use
id
?context: #44 and nuxt/nuxt#12980
The text was updated successfully, but these errors were encountered: