Skip to content

fix(compiler-vapor): do not fold a constant prop with no content attribute - #15606

Merged
edison1105 merged 2 commits into
vuejs:minorfrom
ValentinYoushkevich:fix/vapor-fold-no-attr-props
Sep 23, 2026
Merged

edison1105 merged 2 commits into
vuejs:minorfrom
ValentinYoushkevich:fix/vapor-fold-no-attr-props

Conversation

@ValentinYoushkevich

Copy link
Copy Markdown
Contributor

<video :volume="0.5"> prints volume="0.5" into the markup and leaves el.volume at 1, where VDOM sets the property - at runtime the rule is key in el, and a property that has no content attribute cannot survive a trip through the element's template string. A static literal binding is folded into that string, so the write is simply lost. The same holds for playbackRate, defaultPlaybackRate, currentTime and valueAsNumber, and since HTML parsing lowercases the key, what is left behind is playbackrate="2".

playground - two children render the same <video :volume="0.5">, one compiled as Vapor and one as VDOM. Look at the two lines: VDOM reports el.volume = 0.5 with clean markup, Vapor reports el.volume = 1 and a stray volume="0.5" in the markup.

dynamicKeys exists for exactly this class and already carries indeterminate, so these keys join it. The list approximates key in el, which the compiler cannot evaluate, and does not try to be exhaustive - the comment says as much, and a key it misses is still reachable with .prop. Keys whose attribute does feed the property keep folding, muted among them, since the parser initializes the muted state from the attribute; control tests pin that. Two notes: this is the client render only - after hydration both renderers leave the property at its default, so they stay in step - and where a value is invalid Vapor now emits the same Failed setting prop warning VDOM already did.

@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: cc69999b-702b-4f4a-b9b1-4439c8be6bd5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@vue/compiler-core

pnpm add https://pkg.pr.new/@vue/compiler-core@15606
npm i https://pkg.pr.new/@vue/compiler-core@15606
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/compiler-dom

pnpm add https://pkg.pr.new/@vue/compiler-dom@15606
npm i https://pkg.pr.new/@vue/compiler-dom@15606
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/compiler-sfc

pnpm add https://pkg.pr.new/@vue/compiler-sfc@15606
npm i https://pkg.pr.new/@vue/compiler-sfc@15606
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/compiler-ssr

pnpm add https://pkg.pr.new/@vue/compiler-ssr@15606
npm i https://pkg.pr.new/@vue/compiler-ssr@15606
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/compiler-vapor

pnpm add https://pkg.pr.new/@vue/compiler-vapor@15606
npm i https://pkg.pr.new/@vue/compiler-vapor@15606
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/reactivity

pnpm add https://pkg.pr.new/@vue/reactivity@15606
npm i https://pkg.pr.new/@vue/reactivity@15606
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/runtime-core

pnpm add https://pkg.pr.new/@vue/runtime-core@15606
npm i https://pkg.pr.new/@vue/runtime-core@15606
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/runtime-dom

pnpm add https://pkg.pr.new/@vue/runtime-dom@15606
npm i https://pkg.pr.new/@vue/runtime-dom@15606
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/runtime-vapor

pnpm add https://pkg.pr.new/@vue/runtime-vapor@15606
npm i https://pkg.pr.new/@vue/runtime-vapor@15606
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/server-renderer

pnpm add https://pkg.pr.new/@vue/server-renderer@15606
npm i https://pkg.pr.new/@vue/server-renderer@15606
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/shared

pnpm add https://pkg.pr.new/@vue/shared@15606
npm i https://pkg.pr.new/@vue/shared@15606
yarn add https://pkg.pr.new/@vue/[email protected]

vue

pnpm add https://pkg.pr.new/vue@15606
npm i https://pkg.pr.new/vue@15606
yarn add https://pkg.pr.new/[email protected]

@vue/compat

pnpm add https://pkg.pr.new/@vue/compat@15606
npm i https://pkg.pr.new/@vue/compat@15606
yarn add https://pkg.pr.new/@vue/[email protected]

commit: 98c51a9

@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Size Report

Bundles

File Size Gzip Brotli
compiler-dom.global.prod.js 87.2 kB 30.6 kB 26.9 kB
runtime-dom.global.prod.js 116 kB 43.8 kB 39.2 kB
vue.global.prod.js 176 kB 64 kB 57 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 53.1 kB 20.7 kB 18.9 kB
createApp 61.8 kB 23.9 kB 21.7 kB
createApp + vaporInteropPlugin 123 kB (+24 B) 44.2 kB 39.8 kB (-3 B)
createVaporApp 30.8 kB (+24 B) 11.8 kB (+8 B) 10.9 kB
createSSRApp 66.9 kB 25.9 kB 23.6 kB
createVaporSSRApp 37.4 kB (+330 B) 14.2 kB (+118 B) 13 kB (+99 B)
defineCustomElement 68.4 kB 25.9 kB 23.5 kB
defineVaporCustomElement 46.2 kB (+24 B) 16.8 kB (+3 B) 15.4 kB (+1 B)
overall 77.4 kB 29.4 kB 26.6 kB

@edison1105 edison1105 added the scope: vapor related to vapor mode label Sep 23, 2026
@edison1105
edison1105 force-pushed the fix/vapor-fold-no-attr-props branch from a1de1e8 to 98c51a9 Compare September 23, 2026 07:51
@edison1105
edison1105 merged commit 24c9632 into vuejs:minor Sep 23, 2026
15 checks passed
zhiyuanzmj added a commit to vuejs/vue-jsx-vapor that referenced this pull request Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: vapor related to vapor mode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants