-
-
Notifications
You must be signed in to change notification settings - Fork 9k
Open
Labels
🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.scope: ssr
Description
Vue version
v3.5.26
Link to minimal reproduction
Steps to reproduce
- Open the Vue SFC Playground reproduction
- Enable SSR and switch preview tab to "SSR Output" .
- Inspect the rendered HTML
What is expected?
According to Vue docs (https://vuejs.org/guide/extras/render-function) we can pass props modifiers such as .prop and .attr to h() function to pick the way how keys should be assigned (either as attribute or prop).
What is actually happening?
In SSR mode, when passing props modifiers such as ^ or . to h() function, they are not proccessed and rendered as raw string.
For example is we specify
h('h1', {'^data-attr': 'hello', '.prop': 'world' }, 'Functional component')
We will get the following HTML output
<h1 ^data-attr="hello" .prop="world">Functional component</h1>
It only happens when SSR is enabled
System Info
Any additional comments?
Reported in nuxt/nuxt#33902
Metadata
Metadata
Assignees
Labels
🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.scope: ssr