Skip to content

fix(compiler-vapor): update slot prop component tags when the slot prop changes - #16011

Merged
edison1105 merged 2 commits into
vuejs:minorfrom
meta-syntax:fix/compiler-vapor-slot-prop-dynamic-tag
Oct 29, 2026
Merged

edison1105 merged 2 commits into
vuejs:minorfrom
meta-syntax:fix/compiler-vapor-slot-prop-dynamic-tag

Conversation

@meta-syntax

Copy link
Copy Markdown

Follow-up to #13573, the VDOM change for #8553 that lets a component passed as a slot prop be used as a tag.

In Vapor, the tag reads the slot prop only once:

<Comp v-slot="{ Foo }"><Foo /></Comp>
const n0 = _createComponent(_slotProps0.Foo, null, null, 2 /* SLOT */)
  • When Foo changes to another component, the rendered component does not change.
  • When Foo is a string such as "span", Vapor throws render is not a function.
  • When Foo is null, Vapor throws Cannot read properties of null (reading '__vapor').

In VDOM, the slot calls createVNode(Foo) on each render, so it follows the change, renders <span>, and renders the slot fallback for null.

This PR compiles a tag that refers to a slot prop (<Foo /> and <ui.Foo />) the same way as <component :is>.
The output is now the same as for <component :is="Foo" /> in the same slot, so each such tag now adds an anchor node and a render effect:

const n0 = _createDynamicComponent(() => (_slotProps0.Foo), null, null, 36 /* SLOT_SINGLE_ROOT, SLOT_ROOT */)

<ui.Foo /> is now compiled the same way, so this PR removes slotScopeNamespace, which #15787 added to compile <ui.Foo />.

The added runtime tests render the same templates in VDOM and Vapor, compare the results, and fail without the fix.

@coderabbitai

coderabbitai Bot commented Oct 25, 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
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b5ed32af-e612-4270-96d9-e94d58d659f3

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
  • Autofix · 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 25, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@vue/compiler-core

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

@vue/compiler-dom

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

@vue/compiler-sfc

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

@vue/compiler-ssr

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

@vue/compiler-vapor

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

@vue/reactivity

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

@vue/runtime-core

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

@vue/runtime-dom

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

@vue/runtime-vapor

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

@vue/server-renderer

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

@vue/shared

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

vue

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

@vue/compat

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

commit: 86cc561

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Size Report

Bundles

File Size Gzip Brotli
compiler-dom.global.prod.js 87.4 kB 30.7 kB 27 kB
runtime-dom.global.prod.js 120 kB 45.2 kB 40.4 kB
vue.global.prod.js 181 kB 65.4 kB 58.3 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 53.9 kB 21 kB 19.1 kB
createApp 62.9 kB 24.3 kB 22.1 kB
createApp + vaporInteropPlugin 117 kB 42.9 kB 38.7 kB
createVaporApp 34.2 kB 13.2 kB 12.2 kB
createSSRApp 67.8 kB 26.3 kB 23.9 kB
createVaporSSRApp 41.5 kB 15.9 kB 14.6 kB
defineCustomElement 69.5 kB 26.3 kB 23.9 kB
defineVaporCustomElement 49.1 kB 18 kB 16.5 kB
overall 78.4 kB 29.8 kB 27 kB

@edison1105 edison1105 added the scope: vapor related to vapor mode label Oct 27, 2026
@edison1105
edison1105 force-pushed the fix/compiler-vapor-slot-prop-dynamic-tag branch from d4870a8 to 86cc561 Compare October 29, 2026 01:59
@edison1105
edison1105 merged commit 47d0ec9 into vuejs:minor Oct 29, 2026
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