Visitar URL original
fix(compiler-vapor): assign to the member target when v-model object has a TS wrapper by ValentinYoushkevich · Pull Request #15744 · vuejs/core · GitHub
Skip to content

fix(compiler-vapor): assign to the member target when v-model object has a TS wrapper - #15744

Merged
edison1105 merged 2 commits into
vuejs:minorfrom
ValentinYoushkevich:fix/vapor-v-model-ts-member-target
Oct 8, 2026
Merged

edison1105 merged 2 commits into
vuejs:minorfrom
ValentinYoushkevich:fix/vapor-v-model-ts-member-target

Conversation

@ValentinYoushkevich

Copy link
Copy Markdown
Contributor

When a v-model member target is wrapped in a TS expression, Vapor generates the wrong assignment. v-model="form!.name" compiles to form.value = _value!.name, so typing replaces form instead of setting form.name, while VDOM updates the field (playground). v-model="a.b as T" also emits (_ctx.a.b as T = _value), which is not valid TS and fails the build.

Both forms are in real templates that are one vapor attribute away from hitting this: v-model="paramsDialog.params as any" in mayfly-go, which already runs on createVaporApp, and v-model="form!.tripStartedAt" in ev-monitor (still VDOM).

This treats a member expression under a TS wrapper as a member target and parenthesizes the wrapped target before assigning.

@coderabbitai

coderabbitai Bot commented Oct 2, 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: 743a5382-a34b-40bb-9889-264c73aaca8d

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
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 Oct 2, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@vue/compiler-core

pnpm add https://pkg.pr.new/@vue/compiler-core@15744
npm i https://pkg.pr.new/@vue/compiler-core@15744
yarn add https://pkg.pr.new/@vue/compiler-core@15744.tgz

@vue/compiler-dom

pnpm add https://pkg.pr.new/@vue/compiler-dom@15744
npm i https://pkg.pr.new/@vue/compiler-dom@15744
yarn add https://pkg.pr.new/@vue/compiler-dom@15744.tgz

@vue/compiler-sfc

pnpm add https://pkg.pr.new/@vue/compiler-sfc@15744
npm i https://pkg.pr.new/@vue/compiler-sfc@15744
yarn add https://pkg.pr.new/@vue/compiler-sfc@15744.tgz

@vue/compiler-ssr

pnpm add https://pkg.pr.new/@vue/compiler-ssr@15744
npm i https://pkg.pr.new/@vue/compiler-ssr@15744
yarn add https://pkg.pr.new/@vue/compiler-ssr@15744.tgz

@vue/compiler-vapor

pnpm add https://pkg.pr.new/@vue/compiler-vapor@15744
npm i https://pkg.pr.new/@vue/compiler-vapor@15744
yarn add https://pkg.pr.new/@vue/compiler-vapor@15744.tgz

@vue/reactivity

pnpm add https://pkg.pr.new/@vue/reactivity@15744
npm i https://pkg.pr.new/@vue/reactivity@15744
yarn add https://pkg.pr.new/@vue/reactivity@15744.tgz

@vue/runtime-core

pnpm add https://pkg.pr.new/@vue/runtime-core@15744
npm i https://pkg.pr.new/@vue/runtime-core@15744
yarn add https://pkg.pr.new/@vue/runtime-core@15744.tgz

@vue/runtime-dom

pnpm add https://pkg.pr.new/@vue/runtime-dom@15744
npm i https://pkg.pr.new/@vue/runtime-dom@15744
yarn add https://pkg.pr.new/@vue/runtime-dom@15744.tgz

@vue/runtime-vapor

pnpm add https://pkg.pr.new/@vue/runtime-vapor@15744
npm i https://pkg.pr.new/@vue/runtime-vapor@15744
yarn add https://pkg.pr.new/@vue/runtime-vapor@15744.tgz

@vue/server-renderer

pnpm add https://pkg.pr.new/@vue/server-renderer@15744
npm i https://pkg.pr.new/@vue/server-renderer@15744
yarn add https://pkg.pr.new/@vue/server-renderer@15744.tgz

@vue/shared

pnpm add https://pkg.pr.new/@vue/shared@15744
npm i https://pkg.pr.new/@vue/shared@15744
yarn add https://pkg.pr.new/@vue/shared@15744.tgz

vue

pnpm add https://pkg.pr.new/vue@15744
npm i https://pkg.pr.new/vue@15744
yarn add https://pkg.pr.new/vue@15744.tgz

@vue/compat

pnpm add https://pkg.pr.new/@vue/compat@15744
npm i https://pkg.pr.new/@vue/compat@15744
yarn add https://pkg.pr.new/@vue/compat@15744.tgz

commit: 992a55d

@github-actions

github-actions Bot commented Oct 2, 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 117 kB 43.9 kB 39.4 kB
vue.global.prod.js 177 kB 64.1 kB 57 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 53.2 kB 20.7 kB 18.9 kB
createApp 62 kB 23.9 kB 21.8 kB
createApp + vaporInteropPlugin 131 kB 47.1 kB 42.3 kB
createVaporApp 34.1 kB 13.1 kB 12 kB
createSSRApp 67 kB 26 kB 23.6 kB
createVaporSSRApp 40.9 kB 15.5 kB 14.3 kB
defineCustomElement 68.5 kB 25.9 kB 23.6 kB
defineVaporCustomElement 48.7 kB 17.8 kB 16.4 kB
overall 77.6 kB 29.5 kB 26.7 kB

@edison1105 edison1105 added the scope: vapor related to vapor mode label Oct 3, 2026
@edison1105
edison1105 merged commit fe53ea4 into vuejs:minor Oct 8, 2026
15 checks passed
zhiyuanzmj added a commit to vuejs/vue-jsx-vapor that referenced this pull request Oct 13, 2026
zhiyuanzmj added a commit to re-thc/vue-jsx-vapor that referenced this pull request Oct 18, 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