:slotted() style does not work in SSR when multi component slotted the same compoennt #6093
Labels
🔨 p3-minor-bug
Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.
has PR
A pull request has already been submitted to solve the issue
scope: slots
scope: ssr
Vue version
3.2.36
Link to minimal reproduction
https://codesandbox.io/s/vue-ssr-slot-id-bug-4bjevz?file=/src/App.vue
Also made a sfc playground for bug reproduction
https://play.vuejs.org/#__SSR__eNq1U01PwzAM/StRLnwIrQduVYUEaIdxYAh27KVrvdEtS6rEHUPT/juO049NlHFASFVr+9nOs/uyl/dVNdrWIGOZIGwqlSHcpVqIpCi3bJA50Rps43iXEkXUglGPJlEoSqKjVonLbVkhWeWmMhYF54uFNRtxMQrVnsFFn+D7dzg5DQw7hgtYZLVCsfdH5oZqNGh0cQiI0P+msanaW4dU05NEDRd5I9HlRi/K5WjljKbpuTiVvl+pwE4rLI12qezapjJTynw8cQxtDc0RVPMO+XogvnI7H0vliwUHdgup7DDM7BIwwOO3Z9iR3YEbU9SKss+Ar+CMqj3HkPZQ64JoH+Ux2wlvtNTLmRvvELRrh/JEeTGcn0ra8OOZ0Xu6t6PbdqG0xe7vnerHshqmNXphsEOuUwa9bAIY9eixXMjlUCsashtVcH4nC/aCLijlmzL4jFNtNDS4MDgH/+FXJ4z+fPxUIEgjFRQcjT19hOLy+qrvr4yNxVzRKo86+UqvsI7i0G74ovywmRb7ZS9DQ/9xonmWr5fWkJZiYaEYmqq9j0NDzWtEo+9m4DCJGuefBundltrhC2wFp+s=
Steps to reproduce
App.vue
Outer.vue
Inner.vue
Item.vue
What is expected?
The button has red background and blue text in rendered HTML.
Because the button is slotted by both component
What is actually happening?
No Style is applied and there are warning in the server console
System Info
Any additional comments?
It seems the
@vue/server-renderer
forgot the handle the situation thatscopeId
is a white-space separated list.And try to use something like
data-v-9cfee1a6-s data-v-3fa8c6d2-s
as attribute namecore/packages/server-renderer/src/render.ts
Lines 170 to 173 in bdffc14
Probably the faulty line
The text was updated successfully, but these errors were encountered: