Skip to content

fix(compiler-vapor): keep the .prop and .attr modifier on static prop keys - #15574

Merged
edison1105 merged 1 commit into
vuejs:minorfrom
ValentinYoushkevich:fix/vapor-prop-modifier-static-key
Sep 20, 2026
Merged

edison1105 merged 1 commit into
vuejs:minorfrom
ValentinYoushkevich:fix/vapor-prop-modifier-static-key

Conversation

@ValentinYoushkevich

@ValentinYoushkevich ValentinYoushkevich commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

A v-bind modifier on a static key is dropped once the binding is merged with v-bind="obj": :foo.prop ends up as an attribute where vdom sets the dom property, and :textContent.attr goes the other way and overwrites the element's text (playground — the two columns should read the same).

The static-key branch of genPropKey prints the bare argument name, so the . / ^ prefix is gone once the key lands in a props object. The dynamic branch already prints it and setDynamicProp reads it back. Doing it in transformVBind the way compiler-dom does breaks 31 tests — genSetProp feeds key.content to the helpers verbatim.

:x.prop on a child that declares x now falls into $attrs, like vdom. dedupeProperties still keys on the bare name, so :class.prop beside a static class keeps merging. I left that alone.

… keys

The static-key branch of `genPropKey` emitted the bare argument name, so a
`:foo.prop` / `:foo.attr` binding lost its modifier as soon as the key ended
up in a generated props object - component props and props merged with
`v-bind="obj"`. vdom keeps the `.` / `^` prefix there and the vapor runtime
already reads it back in `setDynamicProp`, so only the dynamic-key branch
behaved correctly.

Prefix the static key with the modifier as well.
@coderabbitai

coderabbitai Bot commented Sep 19, 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: f0208f70-afa5-4285-936b-53eb974a681a

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 19, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vue/compiler-core

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

@vue/compiler-dom

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

@vue/compiler-sfc

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

@vue/compiler-ssr

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

@vue/compiler-vapor

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

@vue/reactivity

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

@vue/runtime-core

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

@vue/runtime-dom

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

@vue/runtime-vapor

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

@vue/server-renderer

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

@vue/shared

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

vue

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

@vue/compat

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

commit: 16415fd

@github-actions

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 117 kB 44 kB 39.4 kB
vue.global.prod.js 177 kB 64.1 kB 57.1 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 53.8 kB 20.9 kB 19.1 kB
createApp 62.5 kB 24 kB 21.9 kB
createApp + vaporInteropPlugin 121 kB 43.6 kB 39.3 kB
createVaporApp 30.8 kB 11.8 kB 10.9 kB
createSSRApp 67.7 kB 26.1 kB 23.7 kB
createVaporSSRApp 37.2 kB 14.1 kB 12.9 kB
defineCustomElement 69.1 kB 26 kB 23.7 kB
defineVaporCustomElement 46.2 kB 16.8 kB 15.4 kB
overall 78.1 kB 29.6 kB 26.8 kB

@edison1105 edison1105 added the scope: vapor related to vapor mode label Sep 20, 2026
@edison1105
edison1105 merged commit f1c66a9 into vuejs:minor Sep 20, 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