v-text directive does not work after SSR if another custom directive is applied to the same element
mefcorvi opened this issue · 1 comments
Vue version
Introduced in 3.4.36. Works fine in 3.4.35.
Link to minimal reproduction
Steps to reproduce
- Define a custom directive, even an empty one without any handlers.
- In the page template, create a
divwith bothv-textand the custom directive applied. - Open the page in SSR mode.
What is expected?
The text set by the v-text directive is displayed.
What is actually happening?
The text does not appear. No errors are logged.
System Info
No response
Any additional comments?
If SSR mode is disabled, everything works as expected. v-html directive works fine in both modes.
Currently, in the case with the custom directive, this branch is triggered, adding an entry to rawChildrenMap:
core/packages/compiler-ssr/src/transforms/ssrTransformElement.ts
Lines 166 to 185 in 664d2e5
The v-html directive works correctly because it overrides the entry in rawChildrenMap, whereas v-text only updates the children property of the node.
core/packages/compiler-ssr/src/transforms/ssrTransformElement.ts
Lines 210 to 217 in 664d2e5