Skip to content

fix(compiler-vapor): report v-model on const bindings - #15779

Merged
edison1105 merged 1 commit into
vuejs:minorfrom
ValentinYoushkevich:fix/vapor-v-model-on-const
Oct 8, 2026
Merged

edison1105 merged 1 commit into
vuejs:minorfrom
ValentinYoushkevich:fix/vapor-v-model-on-const

Conversation

@ValentinYoushkevich

Copy link
Copy Markdown
Contributor

Since #14214 (closing #11265), compiler-core reports X_V_MODEL_ON_CONST when v-model targets a const binding from <script setup>. The vapor v-model transform never got the same check, so the identical SFC with <script setup vapor> compiles without any error and emits _value => (msg = _value) for const msg = 'hello'. The first input event then throws TypeError: Assignment to constant variable at runtime instead of failing at compile time.

This adds the same check to the vapor transform, right after the existing props check, with the same binding types and error location.

Playground: https://play.vuejs.org/#eNq9kk1r3DAQhv/KoMum0NgJhR62jiGEBHJuyUlQtPZkLZBGQjP2Epb970WSaXfbQm45ajQfzzvvHNV9jM0yo9qqjodkowCjzLHXZH0MSeDFxJAeJutGeE3Bw6Zp/4Ry6UZT19baXpOmTtBHZwR7TQBd7C/TwTIYWHIMvj89wMHKBN0QRuyXax9GdF1bXhAIzPozBGJZ401u+ywwBB+tQy4dwiyAKYXE30DeoqU9WAKZECzFWUCmFA6cK7X68RbxMedu4Z7Z7skjCUiAMsWQwGKSNTuHWsEVI5aP4PBTGf0yBn+hJk9h4/G3nAyzKsoyV+4tWIFXYx3XWYW+5FesVT0MhigI7BBmxrFuoZDBztKYle1wMDNj7mcZcvIhWcnAjVZdG+viz4xr++zRmS/qs7p05W//q0G9pjrZ8x7uYDOhc+Edv+u+VzF3Wnnea1UIyjEcj6XZ6VQ5/6E6X+5/jvKDcX4umNgGUlv1pfna3Fynobm9Uadfv4Yetg==

@coderabbitai

coderabbitai Bot commented Oct 6, 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: cc94efcd-90e2-439d-8fd4-4cb4adc6599d

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

Copy link
Copy Markdown

Open in StackBlitz

@vue/compiler-core

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

@vue/compiler-dom

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

@vue/compiler-sfc

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

@vue/compiler-ssr

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

@vue/compiler-vapor

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

@vue/reactivity

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

@vue/runtime-core

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

@vue/runtime-dom

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

@vue/runtime-vapor

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

@vue/server-renderer

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

@vue/shared

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

vue

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

@vue/compat

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

commit: 0aac956

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown

Size Report

Bundles

File Size Gzip Brotli
compiler-dom.global.prod.js 87.2 kB (+1 B) 30.6 kB (+1 B) 26.9 kB (-42 B)
runtime-dom.global.prod.js 117 kB (+125 B) 43.9 kB (+54 B) 39.3 kB (+54 B)
vue.global.prod.js 177 kB (+125 B) 64 kB (+63 B) 57 kB (+46 B)

Usages

Name Size Gzip Brotli
createApp (CAPI only) 53.2 kB (+106 B) 20.7 kB (+45 B) 18.9 kB (+20 B)
createApp 62 kB (+106 B) 23.9 kB (+42 B) 21.8 kB (+27 B)
createApp + vaporInteropPlugin 129 kB (+6.7 kB) 46.6 kB (+2.37 kB) 41.9 kB (+2.08 kB)
createVaporApp 34.1 kB (+3.3 kB) 13.1 kB (+1.26 kB) 12 kB (+1.15 kB)
createSSRApp 67 kB (+106 B) 26 kB (+48 B) 23.6 kB (+31 B)
createVaporSSRApp 40.8 kB (+3.73 kB) 15.5 kB (+1.43 kB) 14.2 kB (+1.3 kB)
defineCustomElement 68.5 kB (+106 B) 25.9 kB (+47 B) 23.6 kB (+57 B)
defineVaporCustomElement 48.6 kB (+2.44 kB) 17.7 kB (+925 B) 16.3 kB (+876 B)
overall 77.5 kB (+106 B) 29.5 kB (+46 B) 26.7 kB (+98 B)

@edison1105 edison1105 added the scope: vapor related to vapor mode label Oct 8, 2026
@edison1105
edison1105 merged commit d42ee34 into vuejs:minor Oct 8, 2026
14 of 15 checks passed
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